Growth #5: crawlable internal links to reports + guides#3
Merged
Conversation
GSC analysis (28d) showed the SSR-indexable-report work from #2 was producing nothing: the live sitemap held 0 report URLs, the demo report was "URL unknown to Google," and 3 of 5 guides were "Discovered – currently not indexed." Root cause was a near-total lack of crawlable internal links — report pages had none (the hero's RecentReports is localStorage-only and the "See a live example" button is a router.push onClick), and the homepage linked neither the guide articles nor any report. - sitemap.ts: hardcode the demo report into STATIC_ROUTES (deduped against the recent-reports set) so ≥1 real, indexable report page is always crawlable even when the Redis-backed recent list is empty. - FeaturedReports.tsx (new): async server component that server-renders crawlable links to /analyze/* — demo first, then recent public reports from Redis, enriched with WCL meta for descriptive anchor text. Returns null if nothing resolves, so it is build-safe with no env. - page.tsx: ISR (revalidate=3600); render FeaturedReports plus a crawlable Guides section linking all five guide articles directly (the Navbar only linked the /guides hub). Typecheck clean (tsc --noEmit); no new lint findings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZFK9cogYksgHxYeAF9ReJ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Why
Ran the full GSC analysis (28d) against the SSR/indexing work shipped in #2 and found it was producing nothing:
sitemap.xmlcontained 0 report URLs (only the 7 static routes)./analyze/ZjKgNYxVcAqR8pGJwas "URL is unknown to Google" — never discovered.warcraft-logs-vs-parseforge,raid-preparation-checklist,wow-classic-loot-council-tools) were "Discovered – currently not indexed."Root cause: a near-total lack of crawlable internal links.
RecentReportsis localStorage-only (invisible to bots) and the "See a live example" button is arouter.push()onClick, not an<a href>./guideshub, which is itself low-authority at position ~15).The report-sitemap code path itself is correct (
getReportMeta → recordRecentReportZADD;getRecentReportsZREVRANGE), so the empty sitemap is a prod runtime condition — most likely missing Upstash env vars in production (usingSharedCache === false). That still needs verifying separately — this PR makes the site robust regardless.Changes
app/sitemap.ts— hardcode the demo report intoSTATIC_ROUTES(deduped against the recent-reports set) so ≥1 real, indexable report page is always in the sitemap even when the Redis-backed list is empty.app/components/FeaturedReports.tsx(new) — async server component that server-renders crawlable links to/analyze/*: demo report first, then recent public reports from Redis, enriched with WCL meta for descriptive anchor text. Returnsnullif nothing resolves → build-safe with no env.app/page.tsx— now ISR (revalidate = 3600); renders<FeaturedReports />plus a crawlable Guides section linking all 5 guide articles directly from the site's highest-authority page.Verification
npx tsc --noEmit→ clean (exit 0)npm run lint→ no new findings in the touched files (pre-existing errors elsewhere only)next buildintentionally left to Vercel (needs prod WCL/Redis env to prerender)After merge / deploy
The sitemap fix doubles as the Redis diagnostic: the demo report enters the sitemap immediately (static); then visit any public report on the live site and re-check
sitemap.xmlwithin ~1h (ISR window). If it appears, the recent-reports pipeline works; if only the demo ever shows, Upstash env is missing in prod (which would also mean the shared cache from #1 is silently degraded to a per-instance Map).🤖 Generated with Claude Code