feat(website): /features index + multilingual sitemap (hreflang + lastmod + sitemap-index + robots.txt)#202
Merged
Conversation
…+ lastmod + sitemap-index + robots.txt)
SEO improvement so crawlers understand the site's information tree
(features / docs / blog) and how each section's content branches into
the three shipped locales (en / es / zh-CN).
Changes:
- **New /features index page** (website/src/pages/features/{index.tsx,
index.module.css}). Renders FeatureGrid wrapped in a thin header
(eyebrow + H1 + intro) so the nine /features/<slug> pages now have
a parent aggregator, matching the pattern /blog and /docs already
have. i18n-ready via translate() with localized OG metadata.
- **FeaturesLayout sidebar gains an "Overview" link** back to the new
/features index, with active-state detection that doesn't false-match
on /features/<slug> subpaths.
- **Sitemap plugin enriched** via createSitemapItems: every URL in each
per-locale sitemap now carries `xhtml:link rel="alternate"
hreflang="..."` entries for all three locales + an x-default — Google
uses these to cluster the per-locale URLs as translations rather than
duplicates. 80 URLs × 4 alternates × 3 sitemaps = 960 hreflang
annotations emitted.
- **lastmod populated** for docs and blog posts via showLastUpdateTime
on both content plugins + experimental_vcs: 'git-eager' on the
future config so git history reads are eager-cached at build start.
Aggregator pages (blog tag indexes, archive, author pages) correctly
have no lastmod — they don't map to a single source file.
- **sitemap-index.xml** (static, website/static/) aggregates the three
per-locale sitemaps so crawlers discover all locales from one entry
point.
- **robots.txt** (static, website/static/) declares `Sitemap:` pointing
at sitemap-index.xml. Without this, the multi-sitemap setup is not
auto-discoverable.
- **i18n keys added** for the /features page (eyebrow, H1, intro, OG
title, OG description, sidebar Overview label) in es + zh-CN code.json.
Build verified locally: 80 URLs × 3 locales, hreflang on every URL,
lastmod on 23 EN / 16 ES / 16 zh-CN URLs (all content; aggregators
correctly skipped).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SEO improvement so crawlers (Google + friends) understand the site's information tree (features / docs / blog) and how each section's content branches into the three shipped locales (en / es / zh-CN).
The trigger: the sitemap analysis from the previous turn showed three gaps — no `/features` aggregator page (asymmetric with `/blog` and `/docs`), no hreflang annotations relating the per-locale URLs, and no `robots.txt` to make the three per-locale sitemaps discoverable from a single entry point.
What changed
1. `/features` index page (consistency with /blog and /docs)
2. Sitemap plugin: hreflang + lastmod
3. Static SEO files
Local build verification
After `npm run build`:
Sample `` entry (the new `/features`):
```xml
https://straymark.dev/features
weekly
0.5
<xhtml:link rel="alternate" hreflang="en" href="https://straymark.dev/features"/>
<xhtml:link rel="alternate" hreflang="es" href="https://straymark.dev/es/features"/>
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://straymark.dev/zh-CN/features"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://straymark.dev/features"/>
```
Test plan
Known limitations (acceptable for v1)
🤖 Generated with Claude Code