Skip to content

fix(docs): export static guide routes (fix #4322) - #4363

Open
dvd233 wants to merge 1 commit into
alibaba:formily_nextfrom
dvd233:fix/guide-static-routes
Open

dvd233 wants to merge 1 commit into
alibaba:formily_nextfrom
dvd233:fix/guide-static-routes

Conversation

@dvd233

@dvd233 dvd233 commented Aug 31, 2026

Copy link
Copy Markdown

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

Fixes #4322.

The deployed documentation site currently emits only the root index.html and 404.html. As a result, Netlify returns HTTP 404 for valid direct links such as /guide/scenes/tab-form. The client-side router can render the page from the 404 shell after JavaScript loads, but the response remains incorrect for link checkers, crawlers, and clients where JavaScript does not run.

Enable Umi 3's exportStatic option so Dumi emits an index.html for every known documentation and demo route. This fixes valid direct links without a catch-all rewrite, so unknown paths still return 404.

Verification

  • yarn build:docs: 210 HTML files emitted; the English and Chinese tab-form routes are generated.
  • Local static server:
    • /guide/scenes/tab-form/ returns 200.
    • /zh-CN/guide/scenes/tab-form/ returns 200.
    • /not-a-real-route returns 404.
  • yarn lint: 0 errors (one pre-existing warning).
  • yarn build: all 14 workspace packages pass.
  • yarn test:prod --runInBand: 60 suites, 716 tests, and 7 snapshots pass.
  • git diff --check passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] 官网 demo 404

1 participant