Locale-Aware Blog Routing#
The blog follows the same route model as docs: default locale paths stay clean, while non-default locales use explicit prefixes.
Clean defaults matter#
For the default locale, the directory lives at /blog and posts live at /blog/[slug].
That keeps canonical URLs short and predictable.
Non-default locales stay explicit#
Spanish and Chinese routes move under locale prefixes:
/es/blog/es/blog/[slug]/zh/blog/zh/blog/[slug]
The content model does not change. Each post simply provides locale variants in the same folder.
Language switching behavior#
On a post page, language switching preserves the current slug.
On the directory page, switching language intentionally drops the active search query and category filter because those values are locale-specific strings.