跳到主要内容
lanzai.co
返回

用 Astro 搭建双语博客

Astro 是构建内容站点的绝佳选择,内置了国际化路由支持。

关键配置

在 astro.config.mjs 中设置 i18n.locales 和 defaultLocale。

内容组织

每篇文章在 src/content/posts/zh 和 en 目录中各有一份,通过 locale 字段区分语言。


分享这篇文章:

上一篇
你好,世界
下一篇
Docker 安装指南(Ubuntu/Debian)