-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocusaurus.config.ts
120 lines (110 loc) · 2.64 KB
/
docusaurus.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import { Config, ThemeConfig } from "@docusaurus/types";
import { } from "@docusaurus/plugin-content-docs";
import { themes } from "prism-react-renderer";
const lightTheme = themes.github;
const darkTheme = themes.dracula;
const name = "顶功 · 集萃";
const themeConfig: ThemeConfig = {
navbar: {
title: "顶功 · 集萃",
logo: {
alt: "顶功 · 集萃",
src: "logo.png",
},
items: [
...[
["教程", "tutorial"],
["理论", "theory"],
].map(([label, sidebarId]) => ({
type: "docSidebar",
position: "left",
label,
sidebarId,
})),
{
position: "left",
label: "验证",
href: "/verifier",
},
{
href: "https://github.com/tansongchen/ding",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
copyright: `Copyright © 2016 - ${new Date().getFullYear()} 蓝落萧, Yb.`,
},
prism: {
theme: lightTheme,
darkTheme: darkTheme,
},
};
const config: Config = {
title: name,
tagline: "顶功汉字输入方案的介绍",
url: "https://ding.tansongchen.com",
baseUrl: "/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "logo.png",
organizationName: "tansongchen",
projectName: "ding",
trailingSlash: false,
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans"],
},
plugins: [
"@docusaurus/plugin-content-pages",
[
"@docusaurus/plugin-content-docs",
{
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.ts"),
remarkPlugins: [require("remark-math")],
rehypePlugins: [require("rehype-katex")],
editUrl: "https://github.com/tansongchen/ding/",
},
],
[
"docusaurus-plugin-pwa-generator",
{
generatorInput: {
source: "static/logo.png",
options: { log: false, padding: "0" },
},
partialManifest: {
name: name,
short_name: name,
theme_color: "#2e8555",
background_color: "#222222",
display: "standalone",
scope: "./",
start_url: "./index.html",
},
},
],
],
themes: [
[
"@docusaurus/theme-classic",
{
customCss: require.resolve("./src/css/custom.css"),
},
],
],
themeConfig,
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
type: "text/css",
integrity:
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
crossorigin: "anonymous",
},
],
};
module.exports = config;