Jacky Zhao
2023-06-17 8bfee04c8c6948a88114d53769d4bb89b8ec7bf5
quartz/components/scripts/spa.inline.ts
@@ -30,7 +30,7 @@
}
function notifyNav(slug: string) {
  const event = new CustomEvent("spa_nav", { detail: { slug } })
  const event = new CustomEvent("nav", { detail: { slug } })
  document.dispatchEvent(event)
}
@@ -96,6 +96,7 @@
      return
    })
  }
  return new class Router {
    go(pathname: string) {
      const url = new URL(pathname, window.location.toString())
@@ -113,6 +114,7 @@
}
createRouter()
notifyNav(document.body.dataset.slug!)
if (!customElements.get('route-announcer')) {
  const attrs = {