Jacky Zhao
2023-08-17 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b
quartz/components/scripts/spa.inline.ts
@@ -1,5 +1,5 @@
import micromorph from "micromorph"
import { CanonicalSlug, RelativeURL, getCanonicalSlug } from "../../path"
import { CanonicalSlug, RelativeURL, getCanonicalSlug } from "../../util/path"
// adapted from `micromorph`
// https://github.com/natemoo-re/micromorph
@@ -17,7 +17,7 @@
      }
      return true
    }
  } catch (e) {}
  } catch (e) { }
  return false
}
@@ -50,6 +50,7 @@
    history.pushState({}, "", url)
    window.scrollTo({ top: 0 })
  }
  const html = p.parseFromString(contents, "text/html")
  let title = html.querySelector("title")?.textContent
  if (title) {