diff --git a/astro.config.mjs b/astro.config.mjs index cb9c3ee..3a16534 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,7 +19,9 @@ export default defineConfig({ }, }, output: "hybrid", - adapter: cloudflare(), + adapter: cloudflare({ + mode: "directory", + }), build: { inlineStylesheets: "auto", }, diff --git a/src/functions/post/_middleware.tsx b/functions/post/_middleware.tsx similarity index 99% rename from src/functions/post/_middleware.tsx rename to functions/post/_middleware.tsx index 43e7e10..c4d5be9 100644 --- a/src/functions/post/_middleware.tsx +++ b/functions/post/_middleware.tsx @@ -82,7 +82,6 @@ const OgImage = ({ ogTitle }: OgImageProps): JSX.Element => { ); }; - const getFontData = async (url: string): Promise => { const css = await ( await fetch(url, { @@ -92,11 +91,9 @@ const getFontData = async (url: string): Promise => { }, }) ).text(); - const resource = css.match( /src: url\((.+)\) format\('(opentype|truetype)'\)/ ); - if (resource === null) { throw new Error("Font resource not found"); } diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..248188e --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,8 @@ +--- +import Layout from "../layouts/Layout.astro"; +--- + + +

404 Not Found

+

ページが見つかりませんでした。

+