fix static image path

This commit is contained in:
flaviomoceri
2025-02-24 10:07:38 +01:00
parent 6648cd700b
commit 525d712cbf
5 changed files with 7 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ export default ((opts?: Options) => {
</footer>
<div
style={{
backgroundImage: "url('static/bg.png')",
backgroundImage: "url('/static/bg.png')",
backgroundSize: "cover",
backgroundPosition: "center",
pointerEvents: "none",
@@ -52,7 +52,7 @@ export default ((opts?: Options) => {
/>
<div
style={{
backgroundImage: "url('static/bg-2.png')",
backgroundImage: "url('/static/bg-2.png')",
backgroundSize: "cover",
backgroundPosition: "center",
pointerEvents: "none",
@@ -68,7 +68,7 @@ export default ((opts?: Options) => {
/>
<div
style={{
backgroundImage: "url('static/bg-3.png')",
backgroundImage: "url('/static/bg-3.png')",
backgroundSize: "cover",
backgroundPosition: "left",
backgroundRepeat: "no-repeat",

View File

@@ -15,7 +15,7 @@ export default (() => {
const path = url.pathname as FullSlug
const baseDir = fileData.slug === "404" ? path : pathToRoot(fileData.slug!)
const iconPath = joinSegments(baseDir, "static/favicon.svg")
const iconPath = joinSegments(baseDir, "/static/favicon.svg")
const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png`
return (

View File

@@ -9,7 +9,7 @@ const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzCompo
return (
<>
<a href="/">
<img style={{ margin: 0 }} src="static/pubky-core-logo.webp" width={209} height={44} />
<img style={{ margin: 0 }} src="/static/pubky-core-logo.webp" width={209} height={44} />
</a>
{/** <h2 class={classNames(displayClass, "page-title")}>
<a href={baseDir}>

View File

@@ -24,7 +24,7 @@ export function pageResources(
baseDir: FullSlug | RelativeURL,
staticResources: StaticResources,
): StaticResources {
const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json")
const contentIndexPath = joinSegments(baseDir, "/static/contentIndex.json")
const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())`
return {

View File

@@ -101,7 +101,7 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
graph.addEdge(
sourcePath,
joinSegments(ctx.argv.output, "static/contentIndex.json") as FilePath,
joinSegments(ctx.argv.output, "/static/contentIndex.json") as FilePath,
)
if (opts?.enableSiteMap) {
graph.addEdge(sourcePath, joinSegments(ctx.argv.output, "sitemap.xml") as FilePath)