Skip to content

Commit

Permalink
middlewareに戻す
Browse files Browse the repository at this point in the history
  • Loading branch information
吉野敬太郎 authored and 吉野敬太郎 committed Sep 16, 2024
1 parent 1e30a08 commit 8846050
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export default defineConfig({
},
},
output: "hybrid",
adapter: cloudflare(),
adapter: cloudflare({
mode: "directory",
}),
build: {
inlineStylesheets: "auto",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ const OgImage = ({ ogTitle }: OgImageProps): JSX.Element => {
</div>
);
};

const getFontData = async (url: string): Promise<ArrayBuffer> => {
const css = await (
await fetch(url, {
Expand All @@ -92,11 +91,9 @@ const getFontData = async (url: string): Promise<ArrayBuffer> => {
},
})
).text();

const resource = css.match(
/src: url\((.+)\) format\('(opentype|truetype)'\)/
);

if (resource === null) {
throw new Error("Font resource not found");
}
Expand Down
8 changes: 8 additions & 0 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
import Layout from "../layouts/Layout.astro";
---

<Layout title="404 Not Found" description="ページが見つかりませんでした。">
<h1 class="text-4xl">404 Not Found</h1>
<p>ページが見つかりませんでした。</p>
</Layout>

0 comments on commit 8846050

Please sign in to comment.