From 6a3502db551282ef15dd5b8f10bf4a792f066e0f Mon Sep 17 00:00:00 2001 From: 7Wate Date: Thu, 13 Jan 2022 14:01:57 +0800 Subject: [PATCH] project(config): updata site config.js --- dist/docusaurus.config.dev.js | 39 ++++++++++++++++++++++++++++++----- docusaurus.config.js | 39 +++++++++++++++++++++++++++++++---- 2 files changed, 69 insertions(+), 9 deletions(-) diff --git a/dist/docusaurus.config.dev.js b/dist/docusaurus.config.dev.js index 0d48c0ef..f37ee244 100644 --- a/dist/docusaurus.config.dev.js +++ b/dist/docusaurus.config.dev.js @@ -10,7 +10,7 @@ var darkCodeTheme = require('prism-react-renderer/themes/dracula'); var config = { title: '7Wate', - tagline: 'For Freedom', + // tagline: 'For Freedom', url: 'https://wiki.7wate.com', baseUrl: '/', onBrokenLinks: 'throw', @@ -25,24 +25,45 @@ var config = { { docs: { sidebarPath: require.resolve('./sidebars.js'), - // Please change this to your repo. editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', - routeBasePath: '/' + routeBasePath: '/', + // showLastUpdateAuthor: true, + showLastUpdateTime: true }, blog: { showReadingTime: true, - // Please change this to your repo. editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master' }, theme: { + // 自定义 css customCss: require.resolve('./src/css/custom.css') } }]], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ { + // 公告 + // announcementBar: { + // id: 'support_us', + // content: + // 'We are looking to revamp our docs, please fill this survey', + // backgroundColor: '#fafbfc', + // textColor: '#091E42', + // isCloseable: false, + // }, + // 导航栏 navbar: { 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: [{ type: 'doc', docId: 'home', @@ -58,14 +79,22 @@ var config = { position: 'right' }] }, + // 页脚 footer: { style: 'dark', copyright: "Copyright \xA9 ".concat(new Date().getFullYear(), " 7Wate, Inc. Built with Docusaurus.") }, + // 代码块 prism: { theme: lightCodeTheme, - darkTheme: darkCodeTheme + darkTheme: darkCodeTheme, + defaultLanguage: 'markdown' } + }, + // 国际化 中文 + i18n: { + defaultLocale: "zh-Hans", + locales: ["zh-Hans"] } }; module.exports = config; \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 2e4eea0f..0428dee2 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -6,8 +6,9 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); /** @type {import('@docusaurus/types').Config} */ const config = { + title: '7Wate', - tagline: 'For Freedom', + // tagline: 'For Freedom', url: 'https://wiki.7wate.com', baseUrl: '/', onBrokenLinks: 'throw', @@ -23,17 +24,18 @@ const config = { ({ docs: { sidebarPath: require.resolve('./sidebars.js'), - // Please change this to your repo. editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', routeBasePath: '/', + // showLastUpdateAuthor: true, + showLastUpdateTime: true, }, blog: { showReadingTime: true, - // Please change this to your repo. editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master', }, theme: { + // 自定义 css customCss: require.resolve('./src/css/custom.css'), }, }), @@ -43,8 +45,29 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ + // 公告 + // announcementBar: { + // id: 'support_us', + // content: + // 'We are looking to revamp our docs, please fill this survey', + // backgroundColor: '#fafbfc', + // textColor: '#091E42', + // isCloseable: false, + // }, + + // 导航栏 navbar: { 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: [ { type: 'doc', @@ -58,18 +81,26 @@ const config = { label: 'Gitea', position: 'right', }, + ], }, + // 页脚 footer: { style: 'dark', copyright: `Copyright © ${new Date().getFullYear()} 7Wate, Inc. Built with Docusaurus.`, }, + // 代码块 prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, + defaultLanguage: 'markdown', }, - }), + // 国际化 中文 + i18n: { + defaultLocale: "zh-Hans", + locales: ["zh-Hans"], + }, }; module.exports = config;