Commit 042e741
feat(seo): pre-render the landing answer block for AI/search discoverability (#593)
The home page rendered its hero client-side, so crawlers and LLM fetchers saw
only the empty skeleton — the worst case for the query "What is Semantic
Anchors?". prerender-routes.js now fills the home #page-content with the hero
copy (title + definition + emphasis), single-sourced from the EN translations
so it never drifts from the live hero. The SPA overwrites #page-content with
the full interactive hero + card grid on boot, so users are unaffected; the
home is written separately so other routes keep their empty-skeleton assumption.
Implements the landing-block half of #580; the per-anchor answer-block sweep is
intentionally skipped — anchor definitions already ship crawlable via
/all-anchors.
Verified with a full build: the home #page-content carries the definition plus
the DefinedTermSet/Organization, and a control route (/about) neither leaks the
home block nor loses its own doc content.
Co-authored-by: Ralf D. Müller <ralf.d.mueller@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent c5d4735 commit 042e741
2 files changed
Lines changed: 47 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
268 | 311 | | |
269 | 312 | | |
270 | 313 | | |
| |||
274 | 317 | | |
275 | 318 | | |
276 | 319 | | |
277 | | - | |
| 320 | + | |
| 321 | + | |
278 | 322 | | |
279 | 323 | | |
280 | 324 | | |
0 commit comments