diff --git a/astro.config.mjs b/astro.config.mjs index 9a25601..3bfb0ef 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,10 +4,11 @@ import starlight from '@astrojs/starlight'; // https://astro.build/config export default defineConfig({ + site: 'https://selfhost-hub.com', integrations: [ starlight({ - title: 'My Docs', - social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/starlight' }], + title: 'SelfHost-Hub', + social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/songtianlun/selfhost-hub' }], sidebar: [ { label: 'Guides', @@ -21,6 +22,18 @@ export default defineConfig({ autogenerate: { directory: 'reference' }, }, ], + defaultLocale: 'root', + locales: { + root: { + label: 'English', + lang: 'en', // lang 是 root 语言必须的 + }, + // 简体中文文档在 `src/content/docs/zh-cn/` 中。 + 'zh-cn': { + label: '简体中文', + lang: 'zh-CN', + }, + }, }), ], });