📝 update index

This commit is contained in:
StarHeartHunt 2021-07-14 10:42:47 +08:00
parent 66b54de869
commit f2295318a9

View File

@ -1,11 +1,11 @@
const path = require("path"); const path = require("path");
module.exports = context => ({ module.exports = (context) => ({
base: process.env.VUEPRESS_BASE || "/", base: process.env.VUEPRESS_BASE || "/",
title: "NoneBot", title: "NoneBot",
description: "跨平台 Python 异步 QQ 机器人框架", description: "跨平台 Python 异步 QQ 机器人框架",
markdown: { markdown: {
lineNumbers: true lineNumbers: true,
}, },
/** /**
* Extra tags to be injected to the page HTML `<head>` * Extra tags to be injected to the page HTML `<head>`
@ -21,43 +21,42 @@ module.exports = context => ({
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }], ["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[ [
"meta", "meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" } { name: "apple-mobile-web-app-status-bar-style", content: "black" },
], ],
[ [
"link", "link",
{ rel: "apple-touch-icon", href: "/icons/apple-touch-icon-180x180.png" } { rel: "apple-touch-icon", href: "/icons/apple-touch-icon-180x180.png" },
], ],
[ [
"link", "link",
{ {
rel: "mask-icon", rel: "mask-icon",
href: "/icons/safari-pinned-tab.svg", href: "/icons/safari-pinned-tab.svg",
color: "#ea5252" color: "#ea5252",
} },
], ],
[ [
"meta", "meta",
{ {
name: "msapplication-TileImage", name: "msapplication-TileImage",
content: "/icons/mstile-150x150.png" content: "/icons/mstile-150x150.png",
} },
], ],
["meta", { name: "msapplication-TileColor", content: "#ea5252" }], ["meta", { name: "msapplication-TileColor", content: "#ea5252" }],
[ [
"link", "link",
{ {
rel: "stylesheet", rel: "stylesheet",
href: href: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css",
"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" },
} ],
]
], ],
locales: { locales: {
"/": { "/": {
lang: "zh-CN", lang: "zh-CN",
title: "NoneBot", title: "NoneBot",
description: "跨平台 Python 异步 QQ 机器人框架" description: "跨平台 Python 异步 QQ 机器人框架",
} },
}, },
theme: "nonebot", theme: "nonebot",
@ -83,7 +82,7 @@ module.exports = context => ({
{ text: "进阶", link: "/advanced/" }, { text: "进阶", link: "/advanced/" },
{ text: "API", link: "/api/" }, { text: "API", link: "/api/" },
{ text: "商店", link: "/store" }, { text: "商店", link: "/store" },
{ text: "更新日志", link: "/changelog" } { text: "更新日志", link: "/changelog" },
], ],
sidebarDepth: 2, sidebarDepth: 2,
sidebar: { sidebar: {
@ -97,8 +96,8 @@ module.exports = context => ({
"installation", "installation",
"getting-started", "getting-started",
"creating-a-project", "creating-a-project",
"basic-configuration" "basic-configuration",
] ],
}, },
{ {
title: "编写插件", title: "编写插件",
@ -109,15 +108,20 @@ module.exports = context => ({
"creating-a-plugin", "creating-a-plugin",
"creating-a-matcher", "creating-a-matcher",
"creating-a-handler", "creating-a-handler",
"end-or-start" "end-or-start",
] ],
}, },
{ {
title: "协议适配", title: "协议适配",
collapsable: false, collapsable: false,
sidebar: "auto", sidebar: "auto",
children: ["cqhttp-guide", "ding-guide", "mirai-guide"] children: [
} "cqhttp-guide",
"ding-guide",
"mirai-guide",
"feishu-guide",
],
},
], ],
"/advanced/": [ "/advanced/": [
{ {
@ -130,15 +134,15 @@ module.exports = context => ({
"permission", "permission",
"runtime-hook", "runtime-hook",
"export-and-require", "export-and-require",
"overloaded-handlers" "overloaded-handlers",
] ],
}, },
{ {
title: "发布", title: "发布",
collapsable: false, collapsable: false,
sidebar: "auto", sidebar: "auto",
children: ["publish-plugin"] children: ["publish-plugin"],
} },
], ],
"/api/": [ "/api/": [
{ {
@ -148,86 +152,90 @@ module.exports = context => ({
children: [ children: [
{ {
title: "nonebot 模块", title: "nonebot 模块",
path: "nonebot" path: "nonebot",
}, },
{ {
title: "nonebot.config 模块", title: "nonebot.config 模块",
path: "config" path: "config",
}, },
{ {
title: "nonebot.plugin 模块", title: "nonebot.plugin 模块",
path: "plugin" path: "plugin",
}, },
{ {
title: "nonebot.message 模块", title: "nonebot.message 模块",
path: "message" path: "message",
}, },
{ {
title: "nonebot.matcher 模块", title: "nonebot.matcher 模块",
path: "matcher" path: "matcher",
}, },
{ {
title: "nonebot.handler 模块", title: "nonebot.handler 模块",
path: "handler" path: "handler",
}, },
{ {
title: "nonebot.rule 模块", title: "nonebot.rule 模块",
path: "rule" path: "rule",
}, },
{ {
title: "nonebot.permission 模块", title: "nonebot.permission 模块",
path: "permission" path: "permission",
}, },
{ {
title: "nonebot.log 模块", title: "nonebot.log 模块",
path: "log" path: "log",
}, },
{ {
title: "nonebot.utils 模块", title: "nonebot.utils 模块",
path: "utils" path: "utils",
}, },
{ {
title: "nonebot.typing 模块", title: "nonebot.typing 模块",
path: "typing" path: "typing",
}, },
{ {
title: "nonebot.exception 模块", title: "nonebot.exception 模块",
path: "exception" path: "exception",
}, },
{ {
title: "nonebot.drivers 模块", title: "nonebot.drivers 模块",
path: "drivers/" path: "drivers/",
}, },
{ {
title: "nonebot.drivers.fastapi 模块", title: "nonebot.drivers.fastapi 模块",
path: "drivers/fastapi" path: "drivers/fastapi",
}, },
{ {
title: "nonebot.drivers.quart 模块", title: "nonebot.drivers.quart 模块",
path: "drivers/quart" path: "drivers/quart",
}, },
{ {
title: "nonebot.adapters 模块", title: "nonebot.adapters 模块",
path: "adapters/" path: "adapters/",
}, },
{ {
title: "nonebot.adapters.cqhttp 模块", title: "nonebot.adapters.cqhttp 模块",
path: "adapters/cqhttp" path: "adapters/cqhttp",
}, },
{ {
title: "nonebot.adapters.ding 模块", title: "nonebot.adapters.ding 模块",
path: "adapters/ding" path: "adapters/ding",
}, },
{ {
title: "nonebot.adapters.mirai 模块", title: "nonebot.adapters.mirai 模块",
path: "adapters/mirai" path: "adapters/mirai",
} },
] {
} title: "nonebot.adapters.feishu 模块",
] path: "adapters/feishu",
} },
} ],
} },
],
},
},
},
}, },
plugins: [ plugins: [
@ -239,9 +247,9 @@ module.exports = context => ({
serviceWorker: true, serviceWorker: true,
updatePopup: { updatePopup: {
message: "发现新内容", message: "发现新内容",
buttonText: "刷新" buttonText: "刷新",
} },
} },
], ],
[ [
"versioning", "versioning",
@ -250,16 +258,16 @@ module.exports = context => ({
pagesSourceDir: path.resolve(context.sourceDir, "..", "pages"), pagesSourceDir: path.resolve(context.sourceDir, "..", "pages"),
onNewVersion(version, versionDestPath) { onNewVersion(version, versionDestPath) {
console.log(`Created version ${version} in ${versionDestPath}`); console.log(`Created version ${version} in ${versionDestPath}`);
} },
} },
], ],
[ [
"container", "container",
{ {
type: "vue", type: "vue",
before: '<pre class="vue-container"><code>', before: '<pre class="vue-container"><code>',
after: "</code></pre>" after: "</code></pre>",
} },
] ],
] ],
}); });