Repository navigation
Commit 24827cb
committed
feat(seo): 🚀 generated social cards (og:image) with Takumi
Page heads
- Every page with a title emits og:title, og:description, og:type,
og:site_name, og:url, og:locale, og:image (with type, size and alt) and
twitter:card; `canonical` and `openGraph` are accepted by plugin route
heads, and delivered content pages pass their canonical URL and card.
- `metadata.ogImage` sets the default image (the generated site card, a URL,
or `false`).
Cards
- The API draws 1200 × 630 PNG cards with Takumi on Node.js and Cloudflare
Workers, with bundled Geist fonts (Latin, Latin Extended, Cyrillic) and no
network access: content (`/delivery/og/{slug}` per content type), member
profiles (`/og/users/{nameCode}`) and the site (`/og/site`).
- Versioned URLs (`v`) are cached for a year, stale ones for an hour; only
public, visible records and existing members are drawn.
- Content Engine: `delivery.seo.openGraph.imageField` is the cover behind
the card (`generateImage: false` uses it as og:image instead); covers and
profile covers are read from storage, and their file id is part of the
card version.
- `ogImage` API config: enabled, fonts, theme, template, templates per
content type, version and `logo` (SVG or data URI; `VITNODE_LOGO_SVG` and
`VITNODE_ICON_SVG` ship with core); plugins register templates with
`buildApiPlugin({ ogImageTemplates })`.
Design (decided from prototype rounds of 25+ variants)
- Pull quote: the logo heads the card, the description is the quote, the
title signs it; profiles quote the headline and sign with name and avatar.
- The cover fills the right 820 px, solid under the quote column, then fades
in along a smoothstep curve; drawn at 82% brightness.
- Theme: the web app's dark tokens.
- Rejected: Quiet, Editorial, Brand, Split, Terminal, Aurora, Poster,
Brutal, Hexgrid, Watermark, Broadcast, Swiss, Thread; quote riffs Light,
Mark, Rule, Speaker, Brand; cover layouts Split, Inset, Band, Duotone; a
blurred full-bleed backdrop (hid the cover) and a logo on the cover.
Plugins and apps
- Blog uses its cover; forum topics and newsroom events get cards. The demo
apps use the VitNode wordmark.
- Docs: new Social images page; Content Engine SEO, route module and
configuration pages updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnAiFbNcH9MjiCNhLJu5hq1 parent c3afc9c commit 24827cb
51 files changed
Lines changed: 2628 additions & 76 deletions
File tree
- apps
- api/src
- web
- content/docs
- content-engine
- dev
- routing
- src
- site/marketing
- packages
- api
- src
- content
- server
- lib
- og-image
- middlewares
- models/user
- modules
- og
- lib
- routes
- users/routes
- vitnode/src
- content
- routing
- tanstack
- content
- metadata
- plugin-routes
- profile
- views/profile
- plugins
- blog/src/content
- forum/src
- content
- pages
- newsroom/src/content
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
190 | 195 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
100 | | - | |
| 103 | + | |
101 | 104 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
113 | 141 | | |
114 | 142 | | |
115 | 143 | | |
| |||
265 | 293 | | |
266 | 294 | | |
267 | 295 | | |
| 296 | + | |
268 | 297 | | |
269 | 298 | | |
| 299 | + | |
| 300 | + | |
270 | 301 | | |
271 | 302 | | |
272 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
Loading
0 commit comments