add log and config docs

This commit is contained in:
yanyongyu
2020-08-20 15:07:05 +08:00
parent 1d982fc77b
commit 02ca49f6d0
20 changed files with 488 additions and 68 deletions

View File

@ -28,7 +28,43 @@ module.exports = {
docsDir: "docs",
lastUpdated: "上次更新",
nav: [{ text: "API", link: "/api/" }],
sidebar: {}
sidebar: {
"/api/": [
{
title: "NoneBot Api Reference",
path: "",
collapsable: false,
sidebarDepth: 3,
children: [
{
title: "nonebot 模块",
path: "nonebot",
sidebar: "auto"
},
{
title: "nonebot.typing 模块",
path: "typing",
sidebar: "auto"
},
{
title: "nonebot.log 模块",
path: "log",
sidebar: "auto"
},
{
title: "nonebot.exception 模块",
path: "exception",
sidebar: "auto"
},
{
title: "nonebot.config 模块",
path: "config",
sidebar: "auto"
}
]
}
]
}
},
plugins: ["@vuepress/plugin-back-to-top", "@vuepress/plugin-medium-zoom"]

View File

@ -10,5 +10,20 @@ export default ({
router, // the router instance for the app
siteData // site metadata
}) => {
// ...apply enhancements for the site.
}
if (typeof process === "undefined" || process.env.VUE_ENV !== "server") {
router.onReady(() => {
const { app } = router;
app.$once("hook:mounted", () => {
// temporary fix for https://github.com/vuejs/vuepress/issues/2428
setTimeout(() => {
const { hash } = document.location;
if (hash.length > 1) {
const id = hash.substring(1);
const element = document.getElementById(id);
if (element) element.scrollIntoView();
}
}, 500);
});
});
}
};

View File

@ -4,7 +4,7 @@
* refhttps://v1.vuepress.vuejs.org/zh/config/#palette-styl
*/
$accentColor = #d32f2f
$accentColor = #ea5252
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34