Fix Netlify publish dir so /docs/ is reachable#1664
Merged
Conversation
`base: '/docs/'` makes VuePress emit assets and internal links under `/docs/...`. To serve them at `https://<domain>/docs/`, Netlify must publish the parent of the `dest` directory so the on-disk `docs/` subdirectory becomes the URL path. Publishing the dest itself made the files reachable at `/` while their internal `/docs/...` references 404'd.
✅ Deploy Preview for hyperformula-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1664 +/- ##
========================================
Coverage 97.18% 97.18%
========================================
Files 174 174
Lines 15086 15086
Branches 3223 3223
========================================
Hits 14662 14662
Misses 424 424 🚀 New features to boost your workflow:
|
Performance comparison of head (be5594b) vs base (110a28a) |
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
Follow-up to #1663. The Netlify deploy succeeded but
https://hyperformula-docs.netlify.app/docs/returns 404.Root cause: with
base: '/docs/', VuePress emits assets and internal links under/docs/...and writes the build todocs/.vuepress/dist/docs/. Settingpublish = "docs/.vuepress/dist/docs"made Netlify serve those files at/, so the page rendered but every internal/docs/...reference 404'd. The publish dir must be the parent of the base path so the on-diskdocs/subdirectory becomes the URL/docs/.Change:
publish = "docs/.vuepress/dist"innetlify.toml.Test plan
https://hyperformula-docs.netlify.app/docs/renders the docs home (no 404)./docs/guide/demo.htmlload with assets and CSS intact./sitemap.xmlis reachable and entries point athttps://hyperformula.handsontable.com/docs/....Note
Low Risk
Low risk configuration-only change that affects where Netlify serves built docs from; primary risk is misconfiguration leading to broken/404 docs paths.
Overview
Fixes the Netlify deployment config by changing the
publishdirectory fromdocs/.vuepress/dist/docstodocs/.vuepress/dist, ensuring the builtdocs/subdirectory is served at/docs/and internal asset/link paths resolve correctly.Reviewed by Cursor Bugbot for commit be5594b. Bugbot is set up for automated code reviews on this repo. Configure here.