Skip to content

Commit 15128da

Browse files
feat(og): uppercase black-weight title with white subtitle (#894)
feat(og): uppercase black-weight title with tighter tracking Render TANSTACK {LIBRARY} in Inter Black (900) with -3px letter spacing and uppercase. Switch subtitle/intro/docs copy to white; library name keeps its accent color. Adds Inter-Black.ttf and bundles it in the Netlify function.
1 parent fcade96 commit 15128da

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

netlify.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ directory = "netlify/functions"
1616
included_files = [
1717
"public/fonts/Inter-Regular.ttf",
1818
"public/fonts/Inter-ExtraBold.ttf",
19+
"public/fonts/Inter-Black.ttf",
1920
"public/images/logos/splash-dark.png",
2021
"node_modules/.pnpm/@takumi-rs+wasm@*/node_modules/@takumi-rs/wasm/pkg/takumi_wasm_bg.wasm",
2122
]

public/fonts/Inter-Black.ttf

66.3 KB
Binary file not shown.

src/server/og/assets.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function readBinary(relPath: string): Buffer {
1111
let cached: {
1212
interRegular: Buffer
1313
interExtraBold: Buffer
14+
interBlack: Buffer
1415
islandPng: Buffer
1516
} | null = null
1617

@@ -20,6 +21,7 @@ export function loadOgAssets() {
2021
cached = {
2122
interRegular: readBinary('public/fonts/Inter-Regular.ttf'),
2223
interExtraBold: readBinary('public/fonts/Inter-ExtraBold.ttf'),
24+
interBlack: readBinary('public/fonts/Inter-Black.ttf'),
2325
islandPng: readBinary('public/images/logos/splash-dark.png'),
2426
}
2527
return cached

src/server/og/generate.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ export function generateOgImageResponse(
128128
weight: 800,
129129
style: 'normal',
130130
},
131+
{
132+
name: 'Inter',
133+
data: assets.interBlack,
134+
weight: 900,
135+
style: 'normal',
136+
},
131137
],
132138
persistentImages: [{ src: ISLAND_KEY, data: assets.islandPng }],
133139
...init,

src/server/og/template.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ export function buildOgTree(props: TemplateProps): ReactElement {
7676
flexDirection: 'column',
7777
marginBottom: 22,
7878
lineHeight: 0.95,
79-
fontWeight: 800,
80-
letterSpacing: '-0.02em',
79+
fontWeight: 900,
80+
letterSpacing: '-3px',
81+
textTransform: 'uppercase',
8182
}}
8283
>
8384
<span style={{ fontSize: 72, color: '#ffffff' }}>{titleLine1}</span>
@@ -93,7 +94,7 @@ export function buildOgTree(props: TemplateProps): ReactElement {
9394
fontSize: 28,
9495
fontWeight: 500,
9596
lineHeight: 1.3,
96-
color: props.accentColor,
97+
color: '#ffffff',
9798
marginBottom: 0,
9899
}}
99100
>
@@ -108,7 +109,7 @@ export function buildOgTree(props: TemplateProps): ReactElement {
108109
lineHeight: 1.05,
109110
letterSpacing: '-0.015em',
110111
marginBottom: 14,
111-
color: props.accentColor,
112+
color: '#ffffff',
112113
}}
113114
>
114115
{props.docTitle}
@@ -120,7 +121,7 @@ export function buildOgTree(props: TemplateProps): ReactElement {
120121
fontSize: 22,
121122
lineHeight: 1.3,
122123
fontWeight: 500,
123-
color: props.accentColor,
124+
color: '#ffffff',
124125
}}
125126
>
126127
{props.description}

0 commit comments

Comments
 (0)