1
0

project(config): updata site config.js

This commit is contained in:
周中平 2022-01-13 14:01:57 +08:00
parent fc258bbe4b
commit 6a3502db55
No known key found for this signature in database
GPG Key ID: B1DF9DD42D8E00DC
2 changed files with 69 additions and 9 deletions

View File

@ -10,7 +10,7 @@ var darkCodeTheme = require('prism-react-renderer/themes/dracula');
var config = { var config = {
title: '7Wate', title: '7Wate',
tagline: 'For Freedom', // tagline: 'For Freedom',
url: 'https://wiki.7wate.com', url: 'https://wiki.7wate.com',
baseUrl: '/', baseUrl: '/',
onBrokenLinks: 'throw', onBrokenLinks: 'throw',
@ -25,24 +25,45 @@ var config = {
{ {
docs: { docs: {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master',
routeBasePath: '/' routeBasePath: '/',
// showLastUpdateAuthor: true,
showLastUpdateTime: true
}, },
blog: { blog: {
showReadingTime: true, showReadingTime: true,
// Please change this to your repo.
editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master' editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master'
}, },
theme: { theme: {
// 自定义 css
customCss: require.resolve('./src/css/custom.css') customCss: require.resolve('./src/css/custom.css')
} }
}]], }]],
themeConfig: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{ {
// 公告
// announcementBar: {
// id: 'support_us',
// content:
// 'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="#">this survey</a>',
// backgroundColor: '#fafbfc',
// textColor: '#091E42',
// isCloseable: false,
// },
// 导航栏
navbar: { navbar: {
title: '7Wate`s Wiki', title: '7Wate`s Wiki',
hideOnScroll: true,
// logo: {
// alt: 'Site Logo',
// src: 'img/logo.svg',
// srcDark: 'img/logo_dark.svg',
// href: 'https://docusaurus.io/',
// target: '_self',
// width: 32,
// height: 32,
// },
items: [{ items: [{
type: 'doc', type: 'doc',
docId: 'home', docId: 'home',
@ -58,14 +79,22 @@ var config = {
position: 'right' position: 'right'
}] }]
}, },
// 页脚
footer: { footer: {
style: 'dark', style: 'dark',
copyright: "Copyright \xA9 ".concat(new Date().getFullYear(), " 7Wate, Inc. Built with Docusaurus.") copyright: "Copyright \xA9 ".concat(new Date().getFullYear(), " 7Wate, Inc. Built with Docusaurus.")
}, },
// 代码块
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,
darkTheme: darkCodeTheme darkTheme: darkCodeTheme,
defaultLanguage: 'markdown'
} }
},
// 国际化 中文
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans"]
} }
}; };
module.exports = config; module.exports = config;

View File

@ -6,8 +6,9 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
title: '7Wate', title: '7Wate',
tagline: 'For Freedom', // tagline: 'For Freedom',
url: 'https://wiki.7wate.com', url: 'https://wiki.7wate.com',
baseUrl: '/', baseUrl: '/',
onBrokenLinks: 'throw', onBrokenLinks: 'throw',
@ -23,17 +24,18 @@ const config = {
({ ({
docs: { docs: {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master',
routeBasePath: '/', routeBasePath: '/',
// showLastUpdateAuthor: true,
showLastUpdateTime: true,
}, },
blog: { blog: {
showReadingTime: true, showReadingTime: true,
// Please change this to your repo.
editUrl: editUrl:
'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master',
}, },
theme: { theme: {
// 自定义 css
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
}, },
}), }),
@ -43,8 +45,29 @@ const config = {
themeConfig: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({ ({
// 公告
// announcementBar: {
// id: 'support_us',
// content:
// 'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="#">this survey</a>',
// backgroundColor: '#fafbfc',
// textColor: '#091E42',
// isCloseable: false,
// },
// 导航栏
navbar: { navbar: {
title: '7Wate`s Wiki', title: '7Wate`s Wiki',
hideOnScroll: true,
// logo: {
// alt: 'Site Logo',
// src: 'img/logo.svg',
// srcDark: 'img/logo_dark.svg',
// href: 'https://docusaurus.io/',
// target: '_self',
// width: 32,
// height: 32,
// },
items: [ items: [
{ {
type: 'doc', type: 'doc',
@ -58,18 +81,26 @@ const config = {
label: 'Gitea', label: 'Gitea',
position: 'right', position: 'right',
}, },
], ],
}, },
// 页脚
footer: { footer: {
style: 'dark', style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} 7Wate, Inc. Built with Docusaurus.`, copyright: `Copyright © ${new Date().getFullYear()} 7Wate, Inc. Built with Docusaurus.`,
}, },
// 代码块
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,
darkTheme: darkCodeTheme, darkTheme: darkCodeTheme,
defaultLanguage: 'markdown',
}, },
}), }),
// 国际化 中文
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans"],
},
}; };
module.exports = config; module.exports = config;