From b8c011410d6bcd6837f4efd6a3948196a0f7aeea Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 10 Jun 2023 06:06:02 +0000
Subject: [PATCH] toc

---
 quartz/plugins/index.ts |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/quartz/plugins/index.ts b/quartz/plugins/index.ts
index 01348c9..32f8bc7 100644
--- a/quartz/plugins/index.ts
+++ b/quartz/plugins/index.ts
@@ -4,6 +4,8 @@
 import { googleFontHref, joinStyles } from '../theme'
 import { EmitCallback, PluginTypes } from './types'
 import styles from '../styles/base.scss'
+// @ts-ignore
+import spaRouterScript from '../components/scripts/spa.inline'
 
 export type ComponentResources = {
   css: string[],
@@ -31,6 +33,10 @@
     afterDOMLoaded: []
   }
 
+  if (cfg.enableSPA) {
+    componentResources.afterDOMLoaded.push(spaRouterScript)
+  }
+
   for (const component of allComponents) {
     const { css, beforeDOMLoaded, afterDOMLoaded } = component
     if (css) {

--
Gitblit v1.10.0