Enable clean URLs for docs site#44
Merged
Merged
Conversation
Re-enable cleanUrls in VitePress so internal links drop the .html suffix, and turn on Vercel cleanUrls so pages serve at the clean path and .html requests 308-redirect to it. Fixes blank pages when a doc URL is opened without the .html suffix (e.g. from release notes).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🧪 Apex Test Results✅ All Tests Passed📦 Download Full Test Results & Logs 📊 Stats: 159 total | ✅ 159 passed | ❌ 0 failed |
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
cleanUrls: truein VitePress config so built internal links drop the.htmlsuffix.cleanUrls: truetovercel.jsonso the host serves pages at the clean path and 308-redirects any.htmlrequest to it.Why
Doc pages open blank when the URL is hit without
.html(e.g. links pasted into GitHub release notes), while the.htmlform works. Root cause:cleanUrls: truewas removed from the VitePress config in Aug 2025 (commit b74bd9d, "Fix"), so the site has been.html-only since. In-site navigation still worked because VitePress rewrites internal links, but direct/external clean URLs 404 to a blank shell.Setting it on both layers fixes it host-side, so no per-link
.htmlbookkeeping in release notes. Old.htmllinks keep working via the redirect.Test plan
npm run docs:buildsucceeds; built internal hrefs now omit.html(verified in dist)/explanations/asyncresult-cleanup(renders) and/explanations/asyncresult-cleanup.html(308-redirects to the clean path)Files