Skip to content

fix(build): locale-home .md/.json projections prerender under the prefix dir#30

Merged
linyiru merged 1 commit into
mainfrom
fix/locale-home-md-prerender
Jul 4, 2026
Merged

fix(build): locale-home .md/.json projections prerender under the prefix dir#30
linyiru merged 1 commit into
mainfrom
fix/locale-home-md-prerender

Conversation

@linyiru

@linyiru linyiru commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Found building the first trilingual Kura static site (en/zh-cn/ko, 177 pages): the build aborted at prerender /zh-cn.md -> 404. prerenderOne only special-cases "/" for projection naming, so a locale home gets "/zh-cn.md" - no "/" boundary, the locale matcher can't strip the prefix, and the request falls into the catch-all as a phantom slug (hard 404 on Kura's docs route; a silently WRONG flat file on apps whose catch-all renders anything - the existing fixture proved this: old code emitted a garbage de.md). Locale homes now request "//index.md" (strips to "/index.md", the home alias) and emit "/index.md", mirroring the root home. Regression assertions are red on old / green on new; suite 334/334. E2E: the trilingual build completes with zh-cn/index.md + ko/index.md in place.

…fix dir

prerenderOne special-cased only "/" for projection naming; a locale home ("/de", "/zh-cn") got
"${reqPath}.md" = "/de.md", which has no "/" boundary for the locale matcher — the prefix never
stripped and the request routed as a phantom "de.md" slug (a hard 404 on Kura's docs catch-all,
aborting i18n static builds; a silently wrong flat file on apps whose catch-all renders anything).
Locale homes now request "/<locale>/index.md" (strips to "/index.md", the home alias) and emit
"<locale>/index.md", byte-consistent with the root home.

Red on old (de.md phantom emitted, de/index.md missing), green on new; suite 334/334. Found
building the first trilingual Kura static site (model-compose, en/zh-cn/ko: 177 pages).
@linyiru linyiru merged commit f562d7c into main Jul 4, 2026
4 checks passed
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.

1 participant