Astro 是构建内容站点的绝佳选择,内置了国际化路由支持。
关键配置
在 astro.config.mjs 中设置 i18n.locales 和 defaultLocale。
内容组织
每篇文章在 src/content/posts/zh 和 en 目录中各有一份,通过 locale 字段区分语言。
Astro 是构建内容站点的绝佳选择,内置了国际化路由支持。
在 astro.config.mjs 中设置 i18n.locales 和 defaultLocale。
每篇文章在 src/content/posts/zh 和 en 目录中各有一份,通过 locale 字段区分语言。