File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
quartz/components/scripts Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments