Skip to content

Commit 6578e35

Browse files
fix: fix Docker build step
1 parent fd7ae74 commit 6578e35

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/google-maps-stats.md

Whitespace-only changes.

src/pages/og.png.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { APIRoute } from "astro";
22
import { generateOgImageForSite } from "@/utils/generateOgImages";
33

4-
export const GET: APIRoute = async () =>
5-
new Response(await generateOgImageForSite(), {
4+
export const GET: APIRoute = async () => {
5+
const buffer = await generateOgImageForSite();
6+
return new Response(new Uint8Array(buffer), {
67
headers: { "Content-Type": "image/png" },
78
});
9+
};

src/pages/posts/[...slug]/index.png.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ export const GET: APIRoute = async ({ props }) => {
2727
});
2828
}
2929

30-
return new Response(
31-
await generateOgImageForPost(props as CollectionEntry<"blog">),
32-
{
33-
headers: { "Content-Type": "image/png" },
34-
}
35-
);
30+
const buffer = await generateOgImageForPost(props as CollectionEntry<"blog">);
31+
return new Response(new Uint8Array(buffer), {
32+
headers: { "Content-Type": "image/png" },
33+
});
3634
};

0 commit comments

Comments
 (0)