diff --git a/docusaurus.config.js b/docusaurus.config.js index 74d29d2..e05f151 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -36,10 +36,20 @@ module.exports = { }, }, colorMode: { - defaultMode: 'light', + defaultMode: 'dark', disableSwitch: false, respectPrefersColorScheme: true, }, + announcementBar: { + content: `⭐️ 如果对你有帮助,请在 GitLink 上给它一颗 ⭐ `, + isCloseable: false, // 是否可关闭 + }, + docs: { + sidebar: { + hideable: true, + autoCollapseCategories: true, + }, + }, navbar: { style:"dark", title: '', @@ -51,13 +61,47 @@ module.exports = { href:"https://www.gitlink.org.cn/" // srcDark: 'img/logo-dark.png', }, + hideOnScroll: true, items: [ { - type: 'doc', - docId: 'intro', + // type: 'doc', + // docId: 'intro', position: 'left', - label: '帮助中心' + label: '帮助中心', + to:'/' }, + { + label:'回到主页', + to:'https://www.gitlink.org.cn/', + position:'left' + }, + { + label: '更多开源', + position: 'right', + items: [ + { + label:'GitHub', + to:'https://github.com/', + }, + { + label:'Gitee', + to:'https://gitee.com/', + }, + { + label:'Stack Overflow', + to:'https://stackoverflow.co/', + }, + ], + }, + { + type: 'localeDropdown', + position: 'right', + }, + + // { + // type: 'search', + // position: 'right', + // }, ], }, footer: { @@ -163,8 +207,17 @@ module.exports = { }, ], ], + // i18n: { + // defaultLocale: 'zh-cn', + // locales: ['zh-cn'], + // }, i18n: { defaultLocale: 'zh-cn', - locales: ['zh-cn'], + locales: ['en', 'zh-cn'], + localeConfigs: { + en: { + htmlLang: 'en-GB', + }, + }, }, };