mirror of
https://github.com/aljazceru/pubky-knowledge-base.git
synced 2025-12-17 05:44:22 +01:00
fix static image path
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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}>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user