refactor(docs): switch to VitePress Plus theme with multi-version builds - #6010
refactor(docs): switch to VitePress Plus theme with multi-version builds#6010rh-hemartin wants to merge 1 commit into
Conversation
Replace the default VitePress theme with @lando/vitepress-theme-default-plus. Drop the hand-rolled escapeVueSyntax markdown preprocessor (the theme handles Vue syntax escaping), add multi-version build support via the mvb CLI and a versions landing page, override the theme's pink/indigo accents with the project's green brand palette, and simplify Vite alias resolution with import.meta.resolve. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 1:59 PM UTC · Completed 2:19 PM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsHigh
Medium
Low
Labels: PR modifies VitePress documentation infrastructure and adds multi-version doc support. Next steps:
|
There was a problem hiding this comment.
See the review comment for full details.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
docs/.vitepress/config.ts(file-level): Line 68 · [high] logic-error
The Vite alias for vue changed from pointing to the package root (which has package.json with proper exports/module fields) to path.dirname(resolve("vue")), which resolves to the dist/ subdirectory. This directory lacks a package.json, so Vite cannot resolve bare import "vue" statements against it, potentially breaking the build.
Suggested fix: Use resolve("vue") directly (the exact ESM entry file) instead of path.dirname(resolve("vue")), or use path.resolve(path.dirname(resolve("vue")), "..") to reach the package root.
docs/.vitepress/theme/index.ts:10: [medium] layout-regression
Layout changed from slot-based composition (layout-top slot) to wrapping ReadingProgress and VPLTheme.Layout in a plain div. The extra wrapper div may break CSS assumptions (flex layouts, full-viewport positioning) that the VitePress theme relies on.
Suggested fix: Check if VPLTheme.Layout supports the layout-top slot. If so, prefer h(VPLTheme.Layout, null, { "layout-top": () => h(ReadingProgress) }).
docs/ADRs/0000-adr-template.md:16: [medium] scope-alignment
The PR wraps {Accepted | Deprecated | Superseded} in backticks as a Vue escaping workaround, while simultaneously claiming the new theme handles Vue syntax escaping. This internal inconsistency undermines the core justification for removing escapeVueSyntax.
Suggested fix: Clarify whether the Lando theme handles Vue syntax escaping. Test ADR template rendering with and without the backtick change.
package.json:21: [low] inconsistency
docs:build uses mvb docs but docs:dev and docs:preview still use standard vitepress commands. This is likely fine since mvb is a production build concern, but should be verified.
Suggested fix: Confirm npm run docs:dev starts without errors with the Lando theme defineConfig.
Summary
Closes #5717
@lando/vitepress-theme-default-plus, which provides built-in multi-version doc support via git-tag discovery and themvbCLIescapeVueSyntaxmarkdown preprocessor (the theme handles Vue syntax escaping)docs/v/index.mdand a sidebar version switcherimport.meta.resolveinstead of manualpath.resolvechainsTest plan
npm run docs:devstarts without errors and renders the site with green brandingnpm run docs:buildcompletes (mvb discovers tags and builds versioned output){{ }}and non-HTML<tags>in markdown render correctly without the old preprocessor/v/versions page lists discovered tags🤖 Generated with Claude Code