Commit 1d12bb9
Changed files (2)
src
integrations
layouts
src/integrations/extract-image.ts
@@ -5,6 +5,7 @@ import { z } from "astro/zod";
import { defineIntegration } from "astro-integration-kit";
import * as cheerio from "cheerio";
import { getBase64ImageInfo } from "../utils/image.js";
+import { url } from "../utils/url.js";
// TODO: After Typst 0.15 published, use jsx and path to auto optimize images in typst
// See https://github.com/typst/typst/pull/7555
@@ -70,7 +71,7 @@ export const extractImage = defineIntegration({
}
}
- $(el).attr("src", `/${options.dir}/${filename}`);
+ $(el).attr("src", url(`/${options.dir}/${filename}`));
htmlChanged = true;
}
src/layouts/GlobalLayout.astro
@@ -26,8 +26,8 @@ const {
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <link rel="icon" href="/favicon.ico" />
+ <link rel="icon" type="image/svg+xml" href={url("/favicon.svg")} />
+ <link rel="icon" href={url("/favicon.ico")} />
<title>{title}</title>
<meta name="title" content={title} />