📝 update document building struct to fit changes in mirai adapter

This commit is contained in:
Mix 2021-02-01 13:20:09 +08:00
parent 8fe562e864
commit 35d34a787b
2 changed files with 67 additions and 56 deletions

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: "基于 酷Q 的 Python 异步 QQ 机器人框架", description: "基于 酷Q 的 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,26 +21,26 @@ 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" }],
[ [
@ -48,16 +48,16 @@ module.exports = context => ({
{ {
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: "基于 酷Q 的 Python 异步 QQ 机器人框架" description: "基于 酷Q 的 Python 异步 QQ 机器人框架",
} },
}, },
theme: "nonebot", theme: "nonebot",
@ -83,7 +83,7 @@ module.exports = context => ({
{ text: "进阶", link: "/advanced/" }, { text: "进阶", link: "/advanced/" },
{ text: "API", link: "/api/" }, { text: "API", link: "/api/" },
{ text: "插件广场", link: "/plugin-store" }, { text: "插件广场", link: "/plugin-store" },
{ text: "更新日志", link: "/changelog" } { text: "更新日志", link: "/changelog" },
], ],
sidebarDepth: 2, sidebarDepth: 2,
sidebar: { sidebar: {
@ -97,8 +97,8 @@ module.exports = context => ({
"installation", "installation",
"getting-started", "getting-started",
"creating-a-project", "creating-a-project",
"basic-configuration" "basic-configuration",
] ],
}, },
{ {
title: "编写插件", title: "编写插件",
@ -109,15 +109,15 @@ 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"] children: ["cqhttp-guide", "ding-guide"],
} },
], ],
"/advanced/": [ "/advanced/": [
{ {
@ -130,15 +130,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,74 +148,78 @@ 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.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.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 模块",
] path: "adapters/mirai",
} },
} ],
} },
],
},
},
},
}, },
plugins: [ plugins: [
@ -227,9 +231,9 @@ module.exports = context => ({
serviceWorker: true, serviceWorker: true,
updatePopup: { updatePopup: {
message: "发现新内容", message: "发现新内容",
buttonText: "刷新" buttonText: "刷新",
} },
} },
], ],
[ [
"versioning", "versioning",
@ -238,16 +242,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>",
} },
] ],
] ],
}); });

View File

@ -36,6 +36,13 @@ NoneBot.adapters.mirai.message 模块
:members: :members:
:show-inheritance: :show-inheritance:
NoneBot.adapters.mirai.utils 模块
===================================
.. automodule:: nonebot.adapters.mirai.utils
:members:
:show-inheritance:
NoneBot.adapters.mirai.event 模块 NoneBot.adapters.mirai.event 模块
================================= =================================