mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-09 23:13:40 +00:00
base path refactor to better support subpath hosting
This commit is contained in:
parent
3201f83b70
commit
c874e7e937
29 changed files with 257 additions and 389 deletions
quartz/plugins/transformers
|
@ -9,7 +9,7 @@ import path from "path"
|
|||
import { JSResource } from "../../util/resources"
|
||||
// @ts-ignore
|
||||
import calloutScript from "../../components/scripts/callout.inline.ts"
|
||||
import { FilePath, canonicalizeServer, pathToRoot, slugTag, slugifyFilePath } from "../../util/path"
|
||||
import { FilePath, 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"
|
||||
|
@ -381,8 +381,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
|||
if (opts.parseTags) {
|
||||
plugins.push(() => {
|
||||
return (tree: Root, file) => {
|
||||
const slug = canonicalizeServer(file.data.slug!)
|
||||
const base = pathToRoot(slug)
|
||||
const base = pathToRoot(file.data.slug!)
|
||||
findAndReplace(tree, tagRegex, (value: string, tag: string) => {
|
||||
if (file.data.frontmatter) {
|
||||
file.data.frontmatter.tags.push(tag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue