Skip to content

Commit 907fd5d

Browse files
committed
Merge branch 'main' into blog-post-little-tweaks
2 parents 0499a65 + b71cf9d commit 907fd5d

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

packages/nextjs/pages/api/og.tsx

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ export const config = {
66
};
77

88
export default async function handler(req: NextRequest) {
9-
const { searchParams } = new URL(req.url);
9+
const { searchParams, origin } = new URL(req.url);
1010
const title = searchParams.get("title") || "BG Sand Garden";
11+
const logoUrl = `${origin}/logo-white.svg`;
1112

1213
// Load Share Tech Mono from Google Fonts (ttf format required by Satori)
1314
const font = await fetch("https://fonts.gstatic.com/s/sharetechmono/v16/J7aHnp1uDWRBEqV98dVQztYldFc7pA.ttf").then(
@@ -28,30 +29,20 @@ export default async function handler(req: NextRequest) {
2829
fontFamily: "Share Tech Mono",
2930
}}
3031
>
31-
{/* Top: Branding */}
32-
<div style={{ display: "flex", flexDirection: "column" }}>
33-
<div style={{ display: "flex", alignItems: "center", gap: "16px" }}>
34-
<div
35-
style={{
36-
fontSize: 42,
37-
color: "#49ff13",
38-
fontWeight: 700,
39-
letterSpacing: "-1px",
40-
}}
41-
>
42-
BG Sand Garden
43-
</div>
44-
</div>
32+
{/* Top: Branding + Logo */}
33+
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "flex-start" }}>
4534
<div
4635
style={{
47-
fontSize: 22,
36+
fontSize: 42,
4837
color: "#49ff13",
49-
opacity: 0.5,
50-
marginTop: "4px",
38+
fontWeight: 700,
39+
letterSpacing: "-1px",
5140
}}
5241
>
53-
BuidlGuidl
42+
BG Sand Garden
5443
</div>
44+
{/* eslint-disable-next-line @next/next/no-img-element */}
45+
<img src={logoUrl} width={192} height={38} alt="" />
5546
</div>
5647

5748
{/* Center: Blog Title */}
Lines changed: 16 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)