fix relative path resolution in router and link crawling

This commit is contained in:
Jacky Zhao 2023-08-16 22:04:15 -07:00
parent 232652149a
commit 2f6747b166
44 changed files with 160 additions and 106 deletions

View file

@ -1,7 +1,7 @@
import type { ContentDetails } from "../../plugins/emitters/contentIndex"
import * as d3 from "d3"
import { registerEscapeHandler, removeAllChildren } from "./util"
import { CanonicalSlug, getCanonicalSlug, getClientSlug, resolveRelative } from "../../path"
import { CanonicalSlug, getCanonicalSlug, getClientSlug, resolveRelative } from "../../util/path"
type NodeData = {
id: CanonicalSlug

View file

@ -1,7 +1,7 @@
import { Document } from "flexsearch"
import { ContentDetails } from "../../plugins/emitters/contentIndex"
import { registerEscapeHandler, removeAllChildren } from "./util"
import { CanonicalSlug, getClientSlug, resolveRelative } from "../../path"
import { CanonicalSlug, getClientSlug, resolveRelative } from "../../util/path"
interface Item {
id: number

View file

@ -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