2021-12-01 16:28:55 +08:00
|
|
|
/**
|
|
|
|
* Creating a sidebar enables you to:
|
|
|
|
- create an ordered group of docs
|
|
|
|
- render a sidebar for each doc of that group
|
|
|
|
- provide next/previous navigation
|
|
|
|
|
|
|
|
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
|
|
|
|
|
|
Create as many sidebars as you want.
|
|
|
|
*/
|
2024-10-22 10:33:48 +08:00
|
|
|
import path from "path";
|
2021-12-01 16:28:55 +08:00
|
|
|
|
2024-10-22 10:33:48 +08:00
|
|
|
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
|
|
|
|
import { getChangelogItemsSync } from "@nullbot/docusaurus-plugin-changelog";
|
2021-12-01 16:28:55 +08:00
|
|
|
|
2024-10-22 10:33:48 +08:00
|
|
|
const changelogPath = path.join(__dirname, "src/changelog/changelog.md");
|
|
|
|
const changelogItems = getChangelogItemsSync(changelogPath, 10);
|
|
|
|
|
|
|
|
const sidebars: SidebarsConfig = {
|
2021-12-24 19:02:11 +08:00
|
|
|
tutorial: [
|
2021-12-02 03:17:10 +08:00
|
|
|
{
|
2021-12-27 22:08:59 +08:00
|
|
|
type: "category",
|
|
|
|
label: "开始",
|
2023-03-24 16:34:21 +08:00
|
|
|
collapsible: false,
|
|
|
|
items: ["index", "quick-start", "editor-support"],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "指南",
|
2021-12-27 22:08:59 +08:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
2023-03-24 16:34:21 +08:00
|
|
|
dirName: "tutorial",
|
2021-12-27 22:08:59 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "category",
|
2023-03-24 16:34:21 +08:00
|
|
|
label: "深入",
|
2021-12-27 22:08:59 +08:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
2023-03-24 16:34:21 +08:00
|
|
|
dirName: "appendices",
|
2021-12-27 22:08:59 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "进阶",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
|
|
|
dirName: "advanced",
|
|
|
|
},
|
|
|
|
],
|
2021-12-02 03:17:10 +08:00
|
|
|
},
|
2023-03-24 16:34:21 +08:00
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "最佳实践",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
|
|
|
dirName: "best-practice",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "开发者",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
|
|
|
dirName: "developer",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-02 03:17:10 +08:00
|
|
|
],
|
2021-12-01 16:28:55 +08:00
|
|
|
api: [{ type: "autogenerated", dirName: "api" }],
|
2023-03-24 16:34:21 +08:00
|
|
|
ecosystem: [
|
2021-12-01 16:28:55 +08:00
|
|
|
{
|
2023-03-24 16:34:21 +08:00
|
|
|
type: "category",
|
|
|
|
label: "关于我们",
|
|
|
|
collapsible: false,
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
|
|
|
dirName: "community",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-06-01 14:18:16 +08:00
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "开源之夏",
|
2023-09-27 16:00:26 +08:00
|
|
|
collapsible: true,
|
2023-06-01 14:18:16 +08:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "autogenerated",
|
|
|
|
dirName: "ospp",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-03-24 16:34:21 +08:00
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "社区资源",
|
|
|
|
collapsible: false,
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: "link",
|
2023-09-27 16:00:26 +08:00
|
|
|
label: "插件商店",
|
|
|
|
href: "/store/plugins",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "link",
|
|
|
|
label: "适配器商店",
|
|
|
|
href: "/store/adapters",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "link",
|
|
|
|
label: "驱动器商店",
|
|
|
|
href: "/store/drivers",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "link",
|
|
|
|
label: "机器人商店",
|
|
|
|
href: "/store/bots",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "link",
|
|
|
|
label: "Awesome NoneBot",
|
|
|
|
href: "https://awesome.nonebot.dev",
|
2023-03-24 16:34:21 +08:00
|
|
|
},
|
2023-06-01 14:18:16 +08:00
|
|
|
{
|
|
|
|
type: "link",
|
|
|
|
label: "论坛",
|
|
|
|
href: "https://discussions.nonebot.dev",
|
|
|
|
},
|
2023-03-24 16:34:21 +08:00
|
|
|
],
|
2021-12-01 16:28:55 +08:00
|
|
|
},
|
|
|
|
],
|
2024-10-22 10:33:48 +08:00
|
|
|
changelog: [
|
|
|
|
{
|
|
|
|
type: "category",
|
|
|
|
label: "更新日志",
|
|
|
|
collapsible: false,
|
|
|
|
items: changelogItems.map<{ type: "link"; label: string; href: string }>(
|
|
|
|
(chunk, index) => ({
|
|
|
|
type: "link",
|
|
|
|
label: chunk[0]!.title,
|
2024-11-01 13:54:27 +08:00
|
|
|
href: `/changelog/${index > 0 ? index.toString() : ""}`,
|
2024-10-22 10:33:48 +08:00
|
|
|
})
|
|
|
|
),
|
|
|
|
},
|
|
|
|
],
|
2021-12-01 16:28:55 +08:00
|
|
|
};
|
|
|
|
|
2024-10-22 10:33:48 +08:00
|
|
|
export default sidebars;
|