mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-04 07:42:23 +00:00
avoid 404 on icon for spa navigations with anchors
This commit is contained in:
parent
dd47be1bc6
commit
78f4cdbe10
2 changed files with 5 additions and 3 deletions
quartz/components
|
@ -1,4 +1,4 @@
|
|||
import { pathToRoot } from "../util/path"
|
||||
import { joinSegments, pathToRoot } from "../util/path"
|
||||
import { JSResourceToScriptElement } from "../util/resources"
|
||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
|
||||
|
@ -8,7 +8,7 @@ export default (() => {
|
|||
const description = fileData.description?.trim() ?? "No description provided"
|
||||
const { css, js } = externalResources
|
||||
const baseDir = pathToRoot(fileData.slug!)
|
||||
const iconPath = baseDir + "/static/icon.png"
|
||||
const iconPath = joinSegments(baseDir, "static/icon.png")
|
||||
const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png`
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue