mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-02 23:08:14 +00:00
fix relative path resolution in router and link crawling
This commit is contained in:
parent
232652149a
commit
2f6747b166
44 changed files with 160 additions and 106 deletions
quartz/plugins/transformers
|
@ -2,7 +2,7 @@ import matter from "gray-matter"
|
|||
import remarkFrontmatter from "remark-frontmatter"
|
||||
import { QuartzTransformerPlugin } from "../types"
|
||||
import yaml from "js-yaml"
|
||||
import { slugTag } from "../../path"
|
||||
import { slugTag } from "../../util/path"
|
||||
|
||||
export interface Options {
|
||||
delims: string | string[]
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
joinSegments,
|
||||
splitAnchor,
|
||||
transformLink,
|
||||
} from "../../path"
|
||||
} from "../../util/path"
|
||||
import path from "path"
|
||||
import { visit } from "unist-util-visit"
|
||||
import isAbsoluteUrl from "is-absolute-url"
|
||||
|
|
|
@ -6,10 +6,10 @@ import { slug as slugAnchor } from "github-slugger"
|
|||
import rehypeRaw from "rehype-raw"
|
||||
import { visit } from "unist-util-visit"
|
||||
import path from "path"
|
||||
import { JSResource } from "../../resources"
|
||||
import { JSResource } from "../../util/resources"
|
||||
// @ts-ignore
|
||||
import calloutScript from "../../components/scripts/callout.inline.ts"
|
||||
import { FilePath, canonicalizeServer, pathToRoot, slugTag, slugifyFilePath } from "../../path"
|
||||
import { FilePath, canonicalizeServer, pathToRoot, slugTag, slugifyFilePath } from "../../util/path"
|
||||
import { toHast } from "mdast-util-to-hast"
|
||||
import { toHtml } from "hast-util-to-html"
|
||||
import { PhrasingContent } from "mdast-util-find-and-replace/lib"
|
||||
|
@ -294,7 +294,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
|||
}
|
||||
|
||||
const text = firstChild.children[0].value
|
||||
const restChildren = firstChild.children.splice(1)
|
||||
const restChildren = firstChild.children.slice(1)
|
||||
const [firstLine, ...remainingLines] = text.split("\n")
|
||||
const remainingText = remainingLines.join("\n")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue