JSONC highlighting & Upgrade VuePress (#1091)

* chore: upgrade vuepress & jsonc highlight

* fix: broken links & wrong code type

* chore: test for github action

* chore(vuepress-deploy.yml): node 20

* fix(config.js): missing favicon

* fix: try to fix memory limit

* chore(vuepress-deploy.yml): remove running repo detection

* chore: use github action workflows directly

* fix(vuepress-deploy.yml): use '&&' not '&'

* fix(vuepress-deploy.yml): contributors

* feat: remove extra emojis

* feat(CONTRIBUTING.md): remove extra emojis

* feat(README.md): remove extra emoji

* fix(live/message_stream.md): missing end tags

* fix: plain text highlight

* chore: upgrade

* chore: upgrade

* chore: upgrade vuepress to 2.0.0-rc.21

* chore: upgrade vuepress to 2.0.0-rc.23

* chore: upgrade vuepress to 2.0.0-rc.24

* chore: upgrade github action node version to 22
This commit is contained in:
Session小胡
2025-07-14 07:12:56 +08:00
committed by GitHub
parent 2ecfe2aa82
commit 2eae485e99
8 changed files with 2078 additions and 1246 deletions

View File

@@ -1,14 +1,19 @@
import { defaultTheme, defineUserConfig } from "vuepress";
import { defineUserConfig } from "vuepress";
import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from "@vuepress/theme-default";
import markdownItTaskLists from "markdown-it-task-lists";
import { copyCodePlugin } from "vuepress-plugin-copy-code2";
import { searchPlugin } from "@vuepress/plugin-search";
import { shikiPlugin } from '@vuepress/plugin-shiki'
const base = "/bilibili-API-collect/";
export default defineUserConfig({
base: "/bilibili-API-collect/",
bundler: viteBundler(),
base: base,
lang: "zh-CN",
title: "BAC Document",
description: "社区开源的第三方哔哩哔哩 API 文档",
head: [["link", { rel: "icon", href: "/logo2.jpg" }]],
head: [["link", { rel: "icon", href: base + "logo2.jpg" }]],
locales: {
"/": {
lang: "zh-CN",
@@ -34,19 +39,26 @@ export default defineUserConfig({
],
},
],
sidebar: "auto",
repo: "https://github.com/SocialSisterYi/bilibili-API-collect",
docsBranch: "master",
editLinkText: "在 GitHub 上编辑此页",
colorMode: "auto"
colorMode: "auto",
themePlugins: {
prismjs: false
}
}),
plugins: [copyCodePlugin({}), searchPlugin({})],
markdown: {
code: {
lineNumbers: true,
},
},
plugins: [
searchPlugin({}),
shikiPlugin({
theme: 'dark-plus',
langs: [
'javascript', 'typescript', 'markdown', 'protobuf', 'json', 'jsonc',
'shell', 'go', 'html', 'http', 'java', 'kotlin', 'python', 'rust', 'c',
'c++', 'cs', 'php', 'swift', 'text'
]
})
],
extendsMarkdown: (md) => {
md.use(markdownItTaskLists);
},
}
});

View File

@@ -13,6 +13,16 @@
</ParentLayout>
</template>
<style>
/* README.md */
.shields a {
margin: auto .25em;
}
.shields a::after {
display: none !important;
}
</style>
<script setup>
import ParentLayout from '@vuepress/theme-default/layouts/Layout.vue';
</script>