2022-01-12 15:43:01 +08:00
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
|
|
|
|
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
|
|
|
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
|
|
|
|
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
2022-01-13 14:01:57 +08:00
|
|
|
|
2022-01-12 17:10:58 +08:00
|
|
|
title: '7Wate',
|
2022-01-13 14:01:57 +08:00
|
|
|
// tagline: 'For Freedom',
|
2022-01-12 17:10:58 +08:00
|
|
|
url: 'https://wiki.7wate.com',
|
2022-01-12 15:43:01 +08:00
|
|
|
baseUrl: '/',
|
|
|
|
onBrokenLinks: 'throw',
|
|
|
|
onBrokenMarkdownLinks: 'warn',
|
|
|
|
favicon: 'img/favicon.ico',
|
2022-01-12 17:10:58 +08:00
|
|
|
organizationName: '7wate', // Usually your GitHub org/user name.
|
|
|
|
projectName: 'wiki', // Usually your repo name.
|
2022-01-12 15:43:01 +08:00
|
|
|
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'classic',
|
|
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
|
|
({
|
|
|
|
docs: {
|
|
|
|
sidebarPath: require.resolve('./sidebars.js'),
|
2022-01-12 17:10:58 +08:00
|
|
|
editUrl: 'https://git.7wate.com/zhouzhongping/wiki/src/branch/master',
|
|
|
|
routeBasePath: '/',
|
2022-01-13 14:01:57 +08:00
|
|
|
// showLastUpdateAuthor: true,
|
|
|
|
showLastUpdateTime: true,
|
2022-01-12 15:43:01 +08:00
|
|
|
},
|
|
|
|
blog: {
|
|
|
|
showReadingTime: true,
|
|
|
|
editUrl:
|
2022-01-12 17:10:58 +08:00
|
|
|
'https://git.7wate.com/zhouzhongping/wiki/src/branch/master',
|
2022-01-12 15:43:01 +08:00
|
|
|
},
|
|
|
|
theme: {
|
2022-01-13 14:01:57 +08:00
|
|
|
// 自定义 css
|
2022-01-12 15:43:01 +08:00
|
|
|
customCss: require.resolve('./src/css/custom.css'),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
2022-01-13 14:01:57 +08:00
|
|
|
// 公告
|
|
|
|
// 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,
|
|
|
|
// },
|
|
|
|
|
|
|
|
// 导航栏
|
2022-01-12 15:43:01 +08:00
|
|
|
navbar: {
|
2022-01-12 17:10:58 +08:00
|
|
|
title: '7Wate`s Wiki',
|
2022-01-13 14:47:49 +08:00
|
|
|
// hideOnScroll: true,
|
2022-01-13 14:01:57 +08:00
|
|
|
// logo: {
|
|
|
|
// alt: 'Site Logo',
|
|
|
|
// src: 'img/logo.svg',
|
|
|
|
// srcDark: 'img/logo_dark.svg',
|
|
|
|
// href: 'https://docusaurus.io/',
|
|
|
|
// target: '_self',
|
|
|
|
// width: 32,
|
|
|
|
// height: 32,
|
|
|
|
// },
|
2022-01-12 15:43:01 +08:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: 'doc',
|
2022-01-12 17:10:58 +08:00
|
|
|
docId: 'home',
|
|
|
|
position: 'right',
|
|
|
|
label: '知识库',
|
2022-01-12 15:43:01 +08:00
|
|
|
},
|
2022-01-12 17:10:58 +08:00
|
|
|
{to: '/blog', label: '博客', position: 'right'},
|
2022-01-12 15:43:01 +08:00
|
|
|
{
|
2022-01-12 17:10:58 +08:00
|
|
|
href: 'https://git.7wate.com/zhouzhongping/wiki',
|
|
|
|
label: 'Gitea',
|
2022-01-12 15:43:01 +08:00
|
|
|
position: 'right',
|
|
|
|
},
|
2022-01-13 14:01:57 +08:00
|
|
|
|
2022-01-12 15:43:01 +08:00
|
|
|
],
|
|
|
|
},
|
2022-01-13 14:01:57 +08:00
|
|
|
// 页脚
|
2022-01-12 15:43:01 +08:00
|
|
|
footer: {
|
|
|
|
style: 'dark',
|
2022-02-25 08:52:21 +08:00
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} 7Wate, Inc. Built with <a href="https://www.docusaurus.cn/" target="_blank" rel="noopener noreferrer">Docusaurus</a>.<br>Powered by <a href="https://webify.cloudbase.net/" target="_blank" rel="noopener noreferrer">CloudBase Webify</a>`,
|
2022-01-12 15:43:01 +08:00
|
|
|
},
|
2022-01-13 14:01:57 +08:00
|
|
|
// 代码块
|
2022-01-12 15:43:01 +08:00
|
|
|
prism: {
|
|
|
|
theme: lightCodeTheme,
|
|
|
|
darkTheme: darkCodeTheme,
|
2022-01-13 14:01:57 +08:00
|
|
|
defaultLanguage: 'markdown',
|
2022-01-12 15:43:01 +08:00
|
|
|
},
|
|
|
|
}),
|
2022-01-13 14:01:57 +08:00
|
|
|
// 国际化 中文
|
|
|
|
i18n: {
|
|
|
|
defaultLocale: "zh-Hans",
|
|
|
|
locales: ["zh-Hans"],
|
|
|
|
},
|
2022-01-12 15:43:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|