Jacky Zhao
2025-03-10 9e3e711646e3db281da11aeb08fc7a10a8dd3be4
quartz/components/renderPage.tsx
@@ -58,6 +58,14 @@
    additionalHead: staticResources.additionalHead,
  }
  resources.js.push({
    src: joinSegments(baseDir, "postscript.js"),
    loadTime: "afterDOMReady",
    moduleType: "module",
    contentType: "external",
  })
  // dynamic afterDOMReady must come after postscript.js
  if (fileData.hasMermaidDiagram) {
    resources.js.push({
      script: mermaidScript,
@@ -68,14 +76,6 @@
    resources.css.push({ content: mermaidStyle, inline: true })
  }
  // NOTE: we have to put this last to make sure spa.inline.ts is the last item.
  resources.js.push({
    src: joinSegments(baseDir, "postscript.js"),
    loadTime: "afterDOMReady",
    moduleType: "module",
    contentType: "external",
  })
  return resources
}