mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-02 06:58:13 +00:00
mobile fixes, fix bug when linking to anchor on home, docs
This commit is contained in:
parent
db6054a8c1
commit
028bcec62c
14 changed files with 134 additions and 24 deletions
|
@ -2,6 +2,7 @@ import { QuartzTransformerPlugin } from "../types"
|
|||
import {
|
||||
CanonicalSlug,
|
||||
RelativeURL,
|
||||
_stripSlashes,
|
||||
canonicalizeServer,
|
||||
joinSegments,
|
||||
pathToRoot,
|
||||
|
@ -35,7 +36,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
|
|||
return (tree, file) => {
|
||||
const curSlug = canonicalizeServer(file.data.slug!)
|
||||
const transformLink = (target: string): RelativeURL => {
|
||||
const targetSlug = transformInternalLink(target).slice("./".length)
|
||||
const targetSlug = _stripSlashes(transformInternalLink(target).slice(".".length))
|
||||
let [targetCanonical, targetAnchor] = splitAnchor(targetSlug)
|
||||
if (opts.markdownLinkResolution === "relative") {
|
||||
return targetSlug as RelativeURL
|
||||
|
|
|
@ -225,7 +225,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
|||
}
|
||||
|
||||
// internal link
|
||||
// const url = transformInternalLink(fp + anchor)
|
||||
const url = fp + anchor
|
||||
return {
|
||||
type: "link",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue