Repository navigation
Expand file tree
/
Copy pathsidebars.js
More file actions
61 lines (58 loc) · 1.47 KB
/
Copy pathsidebars.js
File metadata and controls
61 lines (58 loc) · 1.47 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
const fs = require('node:fs');
const path = require('node:path');
const updatesDirectory = path.join(__dirname, 'docs', 'updates');
const datedUpdates = fs
.readdirSync(updatesDirectory)
.filter((fileName) => /^\d{4}-\d{2}-\d{2}\.md$/.test(fileName))
.sort((left, right) => right.localeCompare(left))
.map((fileName) => `updates/${path.basename(fileName, '.md')}`);
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
clubSidebar: [
{
type: 'doc',
id: 'intro',
label: '首页总览',
},
{
type: 'category',
label: '服务器介绍',
collapsed: false,
items: [
'servers/server-index',
'servers/velocity',
'servers/smp',
'servers/create',
'servers/shou',
],
},
{
type: 'category',
label: '社团资源',
collapsed: true,
items: [
'community/community-index',
'community/club-website',
'community/shou-freshman-manual',
'community/what-to-eat',
'community/shou-laixk',
'community/shou-auth',
'community/pcl-ce-shou',
'community/shou-connect',
'community/shou-campus',
'community/paper-ysm',
'community/discord-bot',
],
},
{
type: 'category',
label: '更新日志',
collapsed: false,
items: [
'updates/updates-index',
...datedUpdates,
],
},
],
};
module.exports = sidebars;