2021-12-01 16:28:55 +08:00
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
|
|
|
|
const lightCodeTheme = require("prism-react-renderer/themes/github");
|
|
|
|
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
|
|
|
|
|
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
|
|
|
title: "NoneBot",
|
|
|
|
tagline: "跨平台 Python 异步机器人框架",
|
|
|
|
url: "https://v2.nonebot.dev",
|
2021-12-02 14:03:06 +08:00
|
|
|
baseUrl: process.env.BASE_URL || "/",
|
2021-12-01 16:28:55 +08:00
|
|
|
onBrokenLinks: "throw",
|
|
|
|
onBrokenMarkdownLinks: "warn",
|
|
|
|
favicon: "icons/favicon.ico",
|
|
|
|
organizationName: "nonebot", // Usually your GitHub org/user name.
|
|
|
|
projectName: "nonebot2", // Usually your repo name.
|
2021-12-02 14:03:06 +08:00
|
|
|
i18n: {
|
|
|
|
defaultLocale: "zh-Hans",
|
|
|
|
locales: ["zh-Hans"],
|
|
|
|
localeConfigs: {
|
|
|
|
"zh-Hans": { label: "简体中文" },
|
|
|
|
},
|
|
|
|
},
|
2021-12-01 16:28:55 +08:00
|
|
|
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"docusaurus-preset-nonepress",
|
|
|
|
/** @type {import('docusaurus-preset-nonepress').Options} */
|
|
|
|
({
|
|
|
|
docs: {
|
|
|
|
sidebarPath: require.resolve("./sidebars.js"),
|
|
|
|
// Please change this to your repo.
|
|
|
|
editUrl: "https://github.com/nonebot/nonebot2/edit/master/website/",
|
|
|
|
showLastUpdateAuthor: true,
|
|
|
|
showLastUpdateTime: true,
|
|
|
|
},
|
2022-01-05 20:39:47 +08:00
|
|
|
sitemap: {
|
|
|
|
changefreq: "daily",
|
|
|
|
priority: 0.5,
|
|
|
|
},
|
2021-12-01 16:28:55 +08:00
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
2021-12-02 14:03:06 +08:00
|
|
|
/** @type {import('docusaurus-preset-nonepress').ThemeConfig} */
|
2021-12-01 16:28:55 +08:00
|
|
|
({
|
|
|
|
colorMode: {
|
|
|
|
defaultMode: "light",
|
|
|
|
},
|
|
|
|
logo: {
|
|
|
|
alt: "",
|
|
|
|
src: "logo.png",
|
|
|
|
href: "/",
|
|
|
|
target: "_self",
|
|
|
|
},
|
|
|
|
navbar: {
|
|
|
|
hideOnScroll: true,
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "指南",
|
|
|
|
type: "docsMenu",
|
|
|
|
category: "guide",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "进阶",
|
|
|
|
type: "docsMenu",
|
|
|
|
category: "advanced",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "API",
|
|
|
|
type: "docLink",
|
|
|
|
docId: "api/index",
|
|
|
|
},
|
|
|
|
{ label: "商店", to: "/store" },
|
|
|
|
{ label: "更新日志", to: "/changelog" },
|
|
|
|
{
|
|
|
|
icon: ["fab", "github"],
|
|
|
|
href: "https://github.com/nonebot/nonebot2",
|
|
|
|
},
|
|
|
|
],
|
2022-01-04 15:27:51 +08:00
|
|
|
docsVersionItemAfter: [
|
|
|
|
{
|
|
|
|
label: "2.0.0a16",
|
|
|
|
href: "https://61d3d9dbcadf413fd3238e89--nonebot2.netlify.app/",
|
|
|
|
},
|
|
|
|
],
|
2021-12-01 16:28:55 +08:00
|
|
|
},
|
|
|
|
hideableSidebar: true,
|
|
|
|
footer: {
|
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} NoneBot. All rights reserved.`,
|
|
|
|
iconLinks: [
|
|
|
|
{
|
|
|
|
icon: ["fab", "github"],
|
|
|
|
href: "https://github.com/nonebot/nonebot2",
|
|
|
|
description: "GitHub",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: ["fab", "qq"],
|
|
|
|
href: "https://jq.qq.com/?_wv=1027&k=5OFifDh",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: ["fab", "telegram"],
|
|
|
|
href: "https://t.me/botuniverse",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: ["fab", "discord"],
|
|
|
|
href: "https://discord.gg/VKtE6Gdc4h",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
links: [
|
|
|
|
{
|
|
|
|
title: "Learn",
|
|
|
|
icon: ["fas", "book"],
|
|
|
|
items: [
|
2021-12-28 01:02:04 +08:00
|
|
|
{ label: "Introduction", to: "/docs/" },
|
|
|
|
{ label: "Installation", to: "/docs/start/installation" },
|
2021-12-01 16:28:55 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "NoneBot Team",
|
|
|
|
icon: ["fas", "user-friends"],
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "Homepage",
|
|
|
|
href: "https://nonebot.dev",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "NoneBot V1",
|
|
|
|
href: "https://docs.nonebot.dev",
|
|
|
|
},
|
|
|
|
{ label: "NoneBot V2", to: "/" },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Related",
|
|
|
|
icon: ["fas", "external-link-alt"],
|
|
|
|
items: [
|
|
|
|
{ label: "OneBot", href: "https://onebot.dev/" },
|
|
|
|
{ label: "go-cqhttp", href: "https://docs.go-cqhttp.org/" },
|
|
|
|
{ label: "Mirai", href: "https://mirai.mamoe.net/" },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
prism: {
|
|
|
|
theme: lightCodeTheme,
|
|
|
|
darkTheme: darkCodeTheme,
|
|
|
|
},
|
|
|
|
algolia: {
|
|
|
|
apiKey: "ef449608d0ad6e81b9efd05db6367040",
|
|
|
|
indexName: "nonebot",
|
|
|
|
contextualSearch: true,
|
2021-12-03 16:21:24 +08:00
|
|
|
// searchParameters: {
|
|
|
|
// facetFilters: ["lang:zh-CN"],
|
|
|
|
// },
|
2021-12-01 16:28:55 +08:00
|
|
|
},
|
|
|
|
tailwindConfig: require("./tailwind.config"),
|
|
|
|
customCss: [require.resolve("./src/css/custom.css")],
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|