fix(page-card): apply UrlPathPrefix to resolved URLs#3490
Conversation
Allow cli TOC entries to override the generated root page title and navigation label without changing schema command names. Co-authored-by: GPT-5.5 <gpt-5.5@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the CLI reference generator overlap by preserving supplemental frontmatter output and keeping the root title override for the generated H1. Co-authored-by: GPT-5.5 <gpt-5.5@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: GPT-5.5 <gpt-5.5@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
…namespace page cards Namespace and sub-namespace page card links were generated as ./segment/index.md, which the docs-builder resolved to /cli/.../segment/index (a 404) instead of /cli/.../segment. Drop the /index.md suffix so links resolve to the correct namespace URL. Affects RootPage (top-level namespaces), NamespacePage (sub-namespaces and alias blurb links). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents padded whitespace in non-empty overrides from leaking into nav/file metadata. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Page-card links were generating site-root-relative hrefs (e.g. /cli/stack/es) without the deployment path prefix, causing 404s in preview environments where the site is hosted under a subpath (e.g. /elastic/cli/pull/406/cli/stack/es). Apply the same UrlPathPrefix logic used by DiagnosticLinkInlineParser. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR makes three focused changes to URL handling and input normalization across CLI reference generation and page card components. The CLI markdown generator removes 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✨ Simplify code
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 |
Summary
PageCardBlock.FinalizeAndValidate()was computing site-root-relative URLs (e.g./cli/stack/es) without applying theUrlPathPrefix, causing all page-card links to 404 in preview environments hosted under a subpath (e.g./elastic/cli/pull/406/).INavigationItem.Urlwhich has the prefix applied at a different layer.UrlPathPrefixlogic already used byDiagnosticLinkInlineParser(lines 361–363).Test plan
/elastic/cli/pull/<N>/cli/stack/esinstead of/cli/stack/es🤖 Generated with Claude Code