Skip to content

Commit 525d712

Browse files
committed
fix static image path
1 parent 6648cd7 commit 525d712

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

quartz/quartz/components/Footer.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default ((opts?: Options) => {
3636
</footer>
3737
<div
3838
style={{
39-
backgroundImage: "url('static/bg.png')",
39+
backgroundImage: "url('/static/bg.png')",
4040
backgroundSize: "cover",
4141
backgroundPosition: "center",
4242
pointerEvents: "none",
@@ -52,7 +52,7 @@ export default ((opts?: Options) => {
5252
/>
5353
<div
5454
style={{
55-
backgroundImage: "url('static/bg-2.png')",
55+
backgroundImage: "url('/static/bg-2.png')",
5656
backgroundSize: "cover",
5757
backgroundPosition: "center",
5858
pointerEvents: "none",
@@ -68,7 +68,7 @@ export default ((opts?: Options) => {
6868
/>
6969
<div
7070
style={{
71-
backgroundImage: "url('static/bg-3.png')",
71+
backgroundImage: "url('/static/bg-3.png')",
7272
backgroundSize: "cover",
7373
backgroundPosition: "left",
7474
backgroundRepeat: "no-repeat",

quartz/quartz/components/Head.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default (() => {
1515
const path = url.pathname as FullSlug
1616
const baseDir = fileData.slug === "404" ? path : pathToRoot(fileData.slug!)
1717

18-
const iconPath = joinSegments(baseDir, "static/favicon.svg")
18+
const iconPath = joinSegments(baseDir, "/static/favicon.svg")
1919
const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png`
2020

2121
return (

quartz/quartz/components/PageTitle.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzCompo
99
return (
1010
<>
1111
<a href="/">
12-
<img style={{ margin: 0 }} src="static/pubky-core-logo.webp" width={209} height={44} />
12+
<img style={{ margin: 0 }} src="/static/pubky-core-logo.webp" width={209} height={44} />
1313
</a>
1414
{/** <h2 class={classNames(displayClass, "page-title")}>
1515
<a href={baseDir}>

quartz/quartz/components/renderPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function pageResources(
2424
baseDir: FullSlug | RelativeURL,
2525
staticResources: StaticResources,
2626
): StaticResources {
27-
const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json")
27+
const contentIndexPath = joinSegments(baseDir, "/static/contentIndex.json")
2828
const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())`
2929

3030
return {

quartz/quartz/plugins/emitters/contentIndex.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
101101

102102
graph.addEdge(
103103
sourcePath,
104-
joinSegments(ctx.argv.output, "static/contentIndex.json") as FilePath,
104+
joinSegments(ctx.argv.output, "/static/contentIndex.json") as FilePath,
105105
)
106106
if (opts?.enableSiteMap) {
107107
graph.addEdge(sourcePath, joinSegments(ctx.argv.output, "sitemap.xml") as FilePath)

0 commit comments

Comments
 (0)