| | |
| | | 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 |
| | |
| | | } |
| | | return true |
| | | } |
| | | } catch (e) {} |
| | | } catch (e) { } |
| | | return false |
| | | } |
| | | |
| | |
| | | history.pushState({}, "", url) |
| | | window.scrollTo({ top: 0 }) |
| | | } |
| | | |
| | | const html = p.parseFromString(contents, "text/html") |
| | | let title = html.querySelector("title")?.textContent |
| | | if (title) { |