nonebot2/docs/.vuepress/config.js

152 lines
3.9 KiB
JavaScript
Raw Normal View History

2020-08-23 09:03:59 +00:00
const path = require("path");
module.exports = context => ({
2020-06-30 04:10:57 +00:00
title: "NoneBot",
description: "基于 酷Q 的 Python 异步 QQ 机器人框架",
markdown: {
lineNumbers: true
},
/**
* Extra tags to be injected to the page HTML `<head>`
*
* refhttps://v1.vuepress.vuejs.org/config/#head
*/
head: [
["link", { rel: "icon", href: "/logo.png" }],
["meta", { name: "theme-color", content: "#d32f2f" }],
["meta", { name: "application-name", content: "NoneBot" }],
["meta", { name: "apple-mobile-web-app-title", content: "NoneBot" }],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" }
2020-09-17 05:12:48 +00:00
],
[
"link",
{
rel: "stylesheet",
href:
"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"
}
2020-06-30 04:10:57 +00:00
]
],
2020-08-23 09:03:59 +00:00
locales: {
"/": {
lang: "zh-CN",
title: "NoneBot",
description: "基于 酷Q 的 Python 异步 QQ 机器人框架"
}
},
2020-06-30 04:10:57 +00:00
2020-08-23 09:03:59 +00:00
theme: "titanium",
2020-06-30 04:10:57 +00:00
themeConfig: {
2020-08-23 09:03:59 +00:00
logo: "/logo.png",
2020-06-30 04:10:57 +00:00
repo: "nonebot/nonebot",
2020-08-20 08:34:07 +00:00
docsDir: "docs",
docsBranch: "dev2",
2020-08-23 09:03:59 +00:00
docsDirVersioned: "archive",
docsDirPages: "pages",
2020-06-30 04:10:57 +00:00
editLinks: true,
2020-08-20 08:34:07 +00:00
smoothScroll: true,
2020-08-23 09:03:59 +00:00
locales: {
"/": {
label: "简体中文",
selectText: "Languages",
editLinkText: "在 GitHub 上编辑此页",
lastUpdated: "上次更新",
2020-09-12 05:45:03 +00:00
nav: [
{ text: "主页", link: "/" },
{ text: "指南", link: "/guide/" },
{ text: "API", link: "/api/" }
],
2020-08-23 09:03:59 +00:00
sidebar: {
2020-09-12 05:45:03 +00:00
"/guide/": [
{
title: "指南",
path: "",
collapsable: false,
sidebar: "auto",
2020-09-17 05:12:48 +00:00
children: [
"",
"installation",
"getting-started",
2020-09-17 10:23:41 +00:00
"creating-a-project",
"basic-configuration"
2020-09-17 05:12:48 +00:00
]
2020-09-12 05:45:03 +00:00
}
],
2020-08-23 09:03:59 +00:00
"/api/": [
2020-08-20 07:07:05 +00:00
{
2020-08-23 09:03:59 +00:00
title: "NoneBot Api Reference",
path: "",
collapsable: false,
children: [
{
title: "nonebot 模块",
path: "nonebot"
},
{
title: "nonebot.typing 模块",
path: "typing"
},
2020-09-12 16:18:31 +00:00
{
title: "nonebot.config 模块",
path: "config"
},
{
title: "nonebot.sched 模块",
path: "sched"
},
2020-08-23 09:03:59 +00:00
{
title: "nonebot.log 模块",
path: "log"
},
2020-09-13 05:01:23 +00:00
{
title: "nonebot.rule 模块",
path: "rule"
},
2020-09-14 12:48:03 +00:00
{
title: "nonebot.permission 模块",
path: "permission"
},
2020-09-12 16:43:31 +00:00
{
title: "nonebot.utils 模块",
path: "utils"
},
2020-08-23 09:03:59 +00:00
{
title: "nonebot.exception 模块",
path: "exception"
}
]
2020-08-20 07:07:05 +00:00
}
]
}
2020-08-23 09:03:59 +00:00
}
2020-08-20 07:07:05 +00:00
}
2020-06-30 04:10:57 +00:00
},
2020-08-23 09:03:59 +00:00
plugins: [
"@vuepress/plugin-back-to-top",
"@vuepress/plugin-medium-zoom",
[
"versioning",
{
versionedSourceDir: path.resolve(context.sourceDir, "..", "archive"),
pagesSourceDir: path.resolve(context.sourceDir, "..", "pages"),
onNewVersion(version, versionDestPath) {
console.log(`Created version ${version} in ${versionDestPath}`);
}
}
2020-09-17 05:12:48 +00:00
],
[
"container",
{
type: "vue",
before: '<pre class="vue-container"><code>',
after: "</code></pre>"
}
2020-08-23 09:03:59 +00:00
]
]
});