Update docusaurus.config.js

This commit is contained in:
ropzz 2024-05-29 09:18:19 +08:00
parent c2a5635479
commit c2500dc36f
1 changed files with 58 additions and 5 deletions

View File

@ -36,10 +36,20 @@ module.exports = {
}, },
}, },
colorMode: { colorMode: {
defaultMode: 'light', defaultMode: 'dark',
disableSwitch: false, disableSwitch: false,
respectPrefersColorScheme: true, respectPrefersColorScheme: true,
}, },
announcementBar: {
content: `⭐️ 如果对你有帮助,请在 <a style="color: red" target="_blank" rel="noopener noreferrer" href="https://www.gitlink.org.cn/Eazzy/gitlink_help_center">GitLink</a> 上给它一颗 ⭐ `,
isCloseable: false, // 是否可关闭
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
navbar: { navbar: {
style:"dark", style:"dark",
title: '', title: '',
@ -51,13 +61,47 @@ module.exports = {
href:"https://www.gitlink.org.cn/" href:"https://www.gitlink.org.cn/"
// srcDark: 'img/logo-dark.png', // srcDark: 'img/logo-dark.png',
}, },
hideOnScroll: true,
items: [ items: [
{ {
type: 'doc', // type: 'doc',
docId: 'intro', // docId: 'intro',
position: 'left', 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: { footer: {
@ -163,8 +207,17 @@ module.exports = {
}, },
], ],
], ],
// i18n: {
// defaultLocale: 'zh-cn',
// locales: ['zh-cn'],
// },
i18n: { i18n: {
defaultLocale: 'zh-cn', defaultLocale: 'zh-cn',
locales: ['zh-cn'], locales: ['en', 'zh-cn'],
localeConfigs: {
en: {
htmlLang: 'en-GB',
},
},
}, },
}; };