1
0
wiki/docusaurus.config.js

180 lines
5.3 KiB
JavaScript
Raw Normal View History

2022-01-12 15:43:01 +08:00
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
2022-05-05 17:27:32 +08:00
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
2022-01-12 15:43:01 +08:00
/** @type {import('@docusaurus/types').Config} */
const config = {
2022-05-05 17:27:32 +08:00
title: "7Wate",
tagline: "For Freedom",
url: "https://wiki.7wate.com",
baseUrl: "/",
onBrokenLinks: "log",
onBrokenMarkdownLinks: "log",
favicon: "img/favicon.ico",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: '7wate', // Usually your GitHub org/user name.
// projectName: 'wiki', // Usually your repo name.
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
2022-05-06 17:41:50 +08:00
defaultLocale: "zh-Hans",
locales: ["zh-Hans"],
2022-05-05 17:27:32 +08:00
},
2022-01-12 15:43:01 +08:00
presets: [
[
2022-05-05 17:27:32 +08:00
"classic",
2022-01-12 15:43:01 +08:00
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
2022-05-05 17:27:32 +08:00
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master",
showLastUpdateAuthor:true,
showLastUpdateTime:true,
breadcrumbs:false,
2022-01-12 15:43:01 +08:00
},
blog: {
2022-05-05 17:27:32 +08:00
blogTitle:"7Wate`s Blog",
blogDescription:"7Wate 的个人生活和工作记录",
blogSidebarCount:7,
blogSidebarTitle:"文章",
2022-01-12 15:43:01 +08:00
showReadingTime: true,
2022-05-05 17:27:32 +08:00
editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master",
2022-01-12 15:43:01 +08:00
},
theme: {
2022-05-05 17:27:32 +08:00
customCss: require.resolve("./src/css/custom.css"),
2022-01-12 15:43:01 +08:00
},
2022-05-06 09:06:41 +08:00
sitemap: {
changefreq: 'weekly',
priority: 0.5,
},
2022-01-12 15:43:01 +08:00
}),
],
],
2022-05-05 17:27:32 +08:00
plugins: [
[
"@docusaurus/plugin-content-docs",
{
id: "life",
path: "life",
routeBasePath: "life",
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master",
showLastUpdateAuthor:true,
showLastUpdateTime:true,
breadcrumbs:false,
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "art",
path: "art",
routeBasePath: "art",
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master",
showLastUpdateAuthor:true,
showLastUpdateTime:true,
breadcrumbs:false,
},
],
[
"@docusaurus/plugin-google-analytics",
{
trackingID: "G-MHMEL0F832",
},
],
2022-05-06 17:41:50 +08:00
// "plugin-image-zoom",
2022-05-05 17:27:32 +08:00
],
2022-04-29 11:28:04 +08:00
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
language: ["en", "zh"],
// ```
},
],
],
2022-01-12 15:43:01 +08:00
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-05-05 17:27:32 +08:00
metadata: [
{
name: "keywords",
content: "7wate, wiki, blog, c, c++, java, python, linux",
},
],
2022-01-12 15:43:01 +08:00
navbar: {
2022-05-05 17:27:32 +08:00
title: "7Wate`s Wiki",
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: [
2022-05-05 17:27:32 +08:00
{ to: "/blog", label: "博客", position: "right" },
2022-01-12 15:43:01 +08:00
{
2022-05-05 17:27:32 +08:00
type: "doc",
docId: "home",
position: "right",
label: "维基",
2022-01-12 15:43:01 +08:00
},
2022-05-05 17:27:32 +08:00
{ to: "/life", label: "生活", position: "right" },
{ to: "/art", label: "艺术", position: "right" },
2022-01-12 15:43:01 +08:00
],
},
footer: {
2022-05-05 17:27:32 +08:00
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
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
2022-05-05 17:27:32 +08:00
defaultLanguage: "markdown",
additionalLanguages: ["java", "git"],
},
2022-05-06 17:41:50 +08:00
// imageZoom: {
// // CSS selector to apply the plugin to, defaults to '.markdown img'
// selector: ".markdown img",
// // Optional medium-zoom options
// // see: https://www.npmjs.com/package/medium-zoom#options
// options: {
// margin: 24,
// background: "#BADA55",
// scrollOffset: 0,
// container: "#zoom-container",
// template: "#zoom-template",
// },
// },
2022-01-12 15:43:01 +08:00
}),
};
module.exports = config;