-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
203 lines (189 loc) · 4.94 KB
/
docusaurus.config.js
File metadata and controls
203 lines (189 loc) · 4.94 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
// @ts-check
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '袋鼠咖啡館',
tagline: 'Slow moments. Good coffee. Better thoughts.',
favicon: 'img/favicon.png',
url: 'https://kangaroo0126.github.io',
baseUrl: '/KangarooCoffeeHub/',
trailingSlash: false,
organizationName: 'kangaroo0126',
projectName: 'KangarooCoffeeHub',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'zh-TW',
locales: ['zh-TW'],
},
markdown: {
mermaid: true,
},
// 加入站內搜尋
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
language: ["zh", "en"],
indexDocs: true,
indexBlog: true,
indexPages: true,
docsRouteBasePath: '/docs',
blogRouteBasePath: '/blog',
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
removeDefaultStopWordFilter: true,
searchResultLimits: 8,
searchResultContextMaxLength: 50,
hashed: true,
ignoreFiles: [],
searchBarShortcut: true,
searchBarShortcutHint: true,
searchBarPosition: "right",
},
],
],
// 預設主題和插件(只留一個)
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
},
blog: {
showReadingTime: true,
feedOptions: {
type: 'all',
title: '袋鼠咖啡館',
description: '袋鼠咖啡館 - 在加速的世界裡,練習慢下來的空間。分享教育、學習、心理與社會議題的思考,以及日常生活的碎片與感悟。沒有演算法,只有真實的整理與對話。',
copyright: `Copyright © ${new Date().getFullYear()} Slow moments. Good coffee. Better thoughts.`,
language: 'zh-TW',
},
},
theme: {
customCss: './src/css/custom.css',
},
gtag: {
trackingID: 'G-1TTB1R6895',
anonymizeIP: true,
},
// ⭐⭐⭐ 新增:Sitemap 設定(關鍵!)
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
}),
],
],
// 額外的文檔插件
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'slowlife',
path: 'slowlife',
routeBasePath: 'slowlife',
sidebarPath: './sidebarsslowlife.js',
},
],
],
// 主題設定
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/docusaurus-social-card.jpg',
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
title: '袋鼠咖啡館',
logo: {
alt: '袋鼠咖啡館的Logo',
src: 'img/favicon.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: '專題文章',
},
{
to: '/blog',
label: '日常思考',
position: 'left',
},
{
to: '/slowlife/intro',
label: '慢行生活',
position: 'left',
},
{
to: '/myshelf',
label: '我的書櫃',
position: 'left',
},
{
to: '/about',
label: '關於我',
position: 'left',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Pages',
items: [
{
label: '專題文章',
to: '/docs/intro',
},
{
label: '日常思考',
to: '/blog',
},
{
label: '我的書櫃',
to: '/myshelf',
},
{
label: '慢行生活',
to: '/slowlife/intro',
},
{
label: '關於我',
to: '/about',
},
],
},
{
title: 'More',
items: [
{
label: '舊版Blog-Medium',
href: 'https://medium.com/@kangarooblog',
},
{
label: 'Profile 個人經歷與作品',
to: '/portfolio',
},
],
},
],
copyright: `Copyright © 2026 Slow moments. Good coffee. Better thoughts.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;