fix: legacy hash links in doc content are dead on pre-rendered pages#600
Conversation
The .adoc sources carry ~150 hash-router links (link:#/anchor/<id>, …) that rendered as dead fragment URLs on the pre-rendered pages, e.g. /spec-driven-development/#/anchor/tdd-london-school. renderFile() now rewrites href="#/…" to href="/Semantic-Anchors/…" after conversion (in-page #section links untouched), and render-contracts.js emits clean anchor URLs directly. With JS the router intercepts the clean URLs for SPA navigation; the client-rendered modal keeps its legacy shim. Refs LLM-Coding#599 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughDie Build-Skripte werden aktualisiert, um ~150 Legacy-Hash-Links in statischen HTML-Ausgaben zu beheben. Verträge und Dokumentation migrieren von Hash-Fragment-Routes ( ChangesLegacy-Link-Migration in Rendering-Skripten
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #599
What
Doc content shipped ~150 legacy hash-router links (
link:#/anchor/<id>,link:#/about, …) that render as dead fragment URLs on the pre-rendered pages —/spec-driven-development/alone had 40 of them (e.g.…/spec-driven-development/#/anchor/tdd-london-school). Crawlers and no-JS visitors couldn't follow any content link to the anchor pages that #598 just made indexable.Fix (single point, sources untouched)
render-docs.js#renderFile(): rewritehref="#/…"→href="/Semantic-Anchors/…"after AsciiDoc conversion. Covers all doc fragments, the full reference, and the per-anchor fragments. In-page TOC/section links (#section-id, no slash) are untouched.render-contracts.js: emit clean anchor URLs directly (it generated its own#/anchor/<id>links).The
.adocsources stay unchanged — the client-rendered anchor modal still converts them in the browser, where the router's legacy hash shim continues to handle them.Verification
grep -rl 'href="#/' dist --include=index.html→ zero matches (before: doc pages + contracts)./spec-driven-development/→anchor/tdd-london-schoollink chain, lands on the real page ("TDD, London School — Semantic Anchors").🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes