app/docs/.vuepress/theme.ts

204 lines
5.5 KiB
TypeScript
Raw Normal View History

import {hopeTheme} from "vuepress-theme-hope";
2024-08-17 02:24:25 +08:00
import {enSidebarConfig, zhSidebarConfig} from "./sidebar/index.js";
import {enNavbarConfig, zhNavbarConfig} from "./navbar/index.js";
2024-03-28 11:12:55 +08:00
export default hopeTheme({
2024-04-07 03:24:13 +08:00
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
2024-08-19 09:43:46 +08:00
hotReload: true,
2024-03-28 11:12:55 +08:00
2024-08-17 02:24:25 +08:00
locales: {
"/": {
navbar: zhNavbarConfig,
sidebar: zhSidebarConfig,
author: {
name: "远野千束",
url: "https://sfkm.me",
}
},
"/en/": {
navbar: enNavbarConfig,
sidebar: enSidebarConfig,
author: {
name: "SnowyKami",
url: "https://sfkm.me",
}
}
},
2024-03-28 11:12:55 +08:00
iconAssets: "fontawesome-with-brands",
2024-03-28 11:12:55 +08:00
2024-06-19 22:30:27 +08:00
logo: "https://cdn.liteyuki.icu/static/img/liteyuki_icon_640.png",
2024-03-28 11:12:55 +08:00
2024-07-06 02:25:12 +08:00
repo: "https://github.com/LiteyukiStudio/LiteyukiBot",
2024-03-28 11:12:55 +08:00
docsDir: "docs",
2024-03-28 11:12:55 +08:00
// 页脚
footer: "LiteyukiBot",
displayFooter: true,
2024-03-28 11:12:55 +08:00
// 加密配置
encrypt: {
config: {
"/demo/encrypt.html": ["1234"],
},
2024-03-28 11:12:55 +08:00
},
// 多语言配置
metaLocales: {
2024-07-21 00:40:55 +08:00
editLink: "在 GitHub 上编辑",
2024-03-28 11:12:55 +08:00
},
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
// hotReload: true,
// 在这里配置主题提供的插件
plugins: {
2024-04-12 13:07:19 +08:00
search: true,
// search: true,
comment: {
provider: "Giscus",
repo: "snowykami/LiteyukiBot",
repoId: "R_kgDOHVNKpQ",
category: "Announcements",
categoryId: "DIC_kwDOHVNKpc4CeWxj",
2024-03-28 11:12:55 +08:00
},
2024-03-28 12:05:03 +08:00
components: {
components: ["Badge", "VPCard"],
},
2024-03-28 12:05:03 +08:00
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
mdEnhance: {
2024-08-05 06:00:07 +08:00
echarts: true,
2024-04-10 23:06:55 +08:00
alert: true,
align: true,
attrs: true,
codetabs: true,
footnote: true,
component: true,
demo: true,
figure: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: true,
stylize: [
{
matcher: "Recommended",
replacer: ({tag}) => {
if (tag === "em")
return {
tag: "Badge",
attrs: {type: "tip"},
content: "Recommended",
};
},
},
],
sub: true,
sup: true,
tabs: true,
vPre: true,
// 在启用之前安装 chart.js
// chart: true,
// insert component easily
// 在启用之前安装 echarts
// echarts: true,
// 在启用之前安装 flowchart.ts
// flowchart: true,
// gfm requires mathjax-full to provide tex support
// gfm: true,
// 在启用之前安装 katex
// katex: true,
// 在启用之前安装 mathjax-full
// mathjax: true,
// 在启用之前安装 mermaid
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// 在启用之前安装 reveal.js
// revealJs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// 在启用之前安装 @vue/repl
// vuePlayground: true,
// install sandpack-vue3 before enabling it
// sandpack: true,
},
2024-03-28 12:05:03 +08:00
// 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释
// pwa: {
// favicon: "/favicon.ico",
// cacheHTML: true,
// cachePic: true,
// appendBase: true,
// apple: {
// icon: "/assets/icon/apple-icon-152.png",
// statusBarColor: "black",
// },
// msTile: {
// image: "/assets/icon/ms-icon-144.png",
// color: "#ffffff",
// },
// manifest: {
// icons: [
// {
// src: "/assets/icon/chrome-mask-512.png",
// sizes: "512x512",
// purpose: "maskable",
2024-08-19 23:47:39 +08:00
// type_: "image/png",
// },
// {
// src: "/assets/icon/chrome-mask-192.png",
// sizes: "192x192",
// purpose: "maskable",
2024-08-19 23:47:39 +08:00
// type_: "image/png",
// },
// {
// src: "/assets/icon/chrome-512.png",
// sizes: "512x512",
2024-08-19 23:47:39 +08:00
// type_: "image/png",
// },
// {
// src: "/assets/icon/chrome-192.png",
// sizes: "192x192",
2024-08-19 23:47:39 +08:00
// type_: "image/png",
// },
// ],
// shortcuts: [
// {
// name: "Demo",
// short_name: "Demo",
// url: "/demo/",
// icons: [
// {
// src: "/assets/icon/guide-maskable.png",
// sizes: "192x192",
// purpose: "maskable",
2024-08-19 23:47:39 +08:00
// type_: "image/png",
// },
// ],
// },
// ],
// },
// },
2024-03-28 11:12:55 +08:00
},
});