Skip to content

Commit 50c0c86

Browse files
committed
Quartz sync: Jun 3, 2025, 10:44 PM
1 parent 07a0e91 commit 50c0c86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

quartz/components/scripts/slide.inline.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function appendRemark(option: SlideOptions) {
101101
const tags = document.querySelector(".page-header .tags")?.outerHTML ?? ""
102102

103103
if (!header) {
104+
console.warn("No header found in the document. Cannot render slide.")
104105
return;
105106
}
106107

@@ -159,8 +160,8 @@ function appendRemark(option: SlideOptions) {
159160
document.head.appendChild(style)
160161

161162
const script = document.createElement("script")
162-
script.src = `https://remarkjs.com/downloads/remark-latest.min.js`
163-
// script.src = `${window.location.origin}/static/scripts/remark.js`
163+
// script.src = `https://remarkjs.com/downloads/remark-latest.min.js`
164+
script.src = `${window.location.origin}/static/scripts/remark.js`
164165

165166
script.onload = () => {
166167
remark.create({
@@ -208,8 +209,10 @@ document.addEventListener("nav", async () => {
208209
const option = (slideContainers[0] as HTMLElement).dataset["cfg"]
209210

210211
if (!option) {
212+
console.warn("No slide configuration found in the clicked element.")
211213
return
212214
}
215+
213216
const mergedOption = paramOption(JSON.parse(option))
214217
appendRemark(mergedOption)
215218
}

0 commit comments

Comments
 (0)