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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 2078 additions and 1246 deletions

View File

@ -1,18 +1,38 @@
name: deploy and pubish name: deploy and publish
on: [push] on: [push]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'SocialSisterYi/bilibili-API-collect' # if: github.repository == 'SocialSisterYi/bilibili-API-collect'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@master uses: actions/checkout@v4
with:
- name: vuepress-deploy fetch-depth: 0
uses: jenkey2011/vuepress-deploy@master - name: Setup Node.js environment
env: uses: actions/setup-node@v4.0.3
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} with:
TARGET_REPO: SocialSisterYi/bilibili-API-collect node-version: 22
TARGET_BRANCH: gh_pages cache: yarn
BUILD_SCRIPT: yarn && yarn build - name: Build with yarn
BUILD_DIR: .vuepress/dist/ run: yarn && yarn build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.vuepress/dist/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

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 markdownItTaskLists from "markdown-it-task-lists";
import { copyCodePlugin } from "vuepress-plugin-copy-code2";
import { searchPlugin } from "@vuepress/plugin-search"; import { searchPlugin } from "@vuepress/plugin-search";
import { shikiPlugin } from '@vuepress/plugin-shiki'
const base = "/bilibili-API-collect/";
export default defineUserConfig({ export default defineUserConfig({
base: "/bilibili-API-collect/", bundler: viteBundler(),
base: base,
lang: "zh-CN", lang: "zh-CN",
title: "BAC Document", title: "BAC Document",
description: "社区开源的第三方哔哩哔哩 API 文档", description: "社区开源的第三方哔哩哔哩 API 文档",
head: [["link", { rel: "icon", href: "/logo2.jpg" }]], head: [["link", { rel: "icon", href: base + "logo2.jpg" }]],
locales: { locales: {
"/": { "/": {
lang: "zh-CN", lang: "zh-CN",
@ -34,19 +39,26 @@ export default defineUserConfig({
], ],
}, },
], ],
sidebar: "auto",
repo: "https://github.com/SocialSisterYi/bilibili-API-collect", repo: "https://github.com/SocialSisterYi/bilibili-API-collect",
docsBranch: "master", docsBranch: "master",
editLinkText: "在 GitHub 上编辑此页", editLinkText: "在 GitHub 上编辑此页",
colorMode: "auto" colorMode: "auto",
themePlugins: {
prismjs: false
}
}), }),
plugins: [copyCodePlugin({}), searchPlugin({})], plugins: [
markdown: { searchPlugin({}),
code: { shikiPlugin({
lineNumbers: true, 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) => { extendsMarkdown: (md) => {
md.use(markdownItTaskLists); md.use(markdownItTaskLists);
}, }
}); });

View File

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

View File

@ -31,7 +31,7 @@
- QQ 交流群:[邀请链接](https://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ympvb3LAPT-Ulu3ezhGqbkJ8zXMKImOX&authKey=z1KdkOdKO3wytN43m9K6On9nBtnDL4pAoD6VQHCipFBb9TasNDKuDHCmOE6TF3uc&noverify=0&group_code=191187164) - QQ 交流群:[邀请链接](https://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ympvb3LAPT-Ulu3ezhGqbkJ8zXMKImOX&authKey=z1KdkOdKO3wytN43m9K6On9nBtnDL4pAoD6VQHCipFBb9TasNDKuDHCmOE6TF3uc&noverify=0&group_code=191187164)
- Telegram 交流群:[@bilibili_API_collect_community](https://t.me/bilibili_API_collect_community) - Telegram 交流群:[@bilibili_API_collect_community](https://t.me/bilibili_API_collect_community)
::: tip 提示 ::: tip 提示
QQ 交流群为综合技术交流群(兼 Owner 的粉丝群),可交流探讨任何技术,包括但不限于 [BAC 项目](https://github.com/SocialSisterYi/bilibili-API-collect) QQ 交流群为综合技术交流群(兼 Owner 的粉丝群),可交流探讨任何技术,包括但不限于 [BAC 项目](https://github.com/SocialSisterYi/bilibili-API-collect)
@ -39,7 +39,7 @@ Telegram 交流群主要用作 [BAC 项目](https://github.com/SocialSisterYi/bi
::: :::
::: warning ⚠️注意 ::: warning 注意
群内讨论同样需要遵守**公开交流**的原则,以及群内会定期清理不活跃成员。 群内讨论同样需要遵守**公开交流**的原则,以及群内会定期清理不活跃成员。
@ -47,7 +47,7 @@ Telegram 交流群主要用作 [BAC 项目](https://github.com/SocialSisterYi/bi
::: :::
::: danger 🈲禁止 ::: danger 禁止
项目 Issue 及其相关社群中**禁止**询问讨论 风控解除、爬虫(采集)、破解、漏洞利用、买卖代码和账号 相关内容,抵制基于本项目进行的一切黑产行为! 项目 Issue 及其相关社群中**禁止**询问讨论 风控解除、爬虫(采集)、破解、漏洞利用、买卖代码和账号 相关内容,抵制基于本项目进行的一切黑产行为!

View File

@ -37,7 +37,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC少部分接
小小的 Demo~~av583785685~~ [视频失效原因](https://shakaianee.top/archives/56/) ([Youtube 备链](https://www.youtube.com/watch?v=nfF91Z6fqGk)) 小小的 Demo~~av583785685~~ [视频失效原因](https://shakaianee.top/archives/56/) ([Youtube 备链](https://www.youtube.com/watch?v=nfF91Z6fqGk))
::: warning ⚠️声明 ::: warning 声明
1. 本项目遵守 CC-BY-NC 4.0 协议,禁止一切商业使用,如需转载请注明作者 ID 1. 本项目遵守 CC-BY-NC 4.0 协议,禁止一切商业使用,如需转载请注明作者 ID
2. **请勿滥用,本项目仅用于学习和测试!请勿滥用,本项目仅用于学习和测试!请勿滥用,本项目仅用于学习和测试!** 2. **请勿滥用,本项目仅用于学习和测试!请勿滥用,本项目仅用于学习和测试!请勿滥用,本项目仅用于学习和测试!**
@ -393,9 +393,3 @@ OR Aifadian[https://afdian.com/@ShakaiAneE](https://afdian.com/@ShakaiAneE)
- [grpc/grpc](https://github.com/grpc/grpc): The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) - [grpc/grpc](https://github.com/grpc/grpc): The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
- [glideapps/quicktype](https://github.com/glideapps/quicktype): quicktype generates strongly-typed models and serializers from JSON, JSON Schema, TypeScript, and GraphQL queries, making it a breeze to work with JSON type-safely in many programming languages. 一键生成多种语言的JSON反序列化所需类以便于快速反序列化有网页版 - [glideapps/quicktype](https://github.com/glideapps/quicktype): quicktype generates strongly-typed models and serializers from JSON, JSON Schema, TypeScript, and GraphQL queries, making it a breeze to work with JSON type-safely in many programming languages. 一键生成多种语言的JSON反序列化所需类以便于快速反序列化有网页版
- [SessionHu/json-apidoc-gen](https://github.com/SessionHu/json-apidoc-gen): Simple CLI tool for generating BAC document template - [SessionHu/json-apidoc-gen](https://github.com/SessionHu/json-apidoc-gen): Simple CLI tool for generating BAC document template
<style scoped>
.shields a {
margin: auto .5em;
}
</style>

View File

@ -4,17 +4,17 @@
"repository": "https://github.com/SocialSisterYi/bilibili-API-collect.git", "repository": "https://github.com/SocialSisterYi/bilibili-API-collect.git",
"author": "SocialSisterYi <1440239038@qq.com>", "author": "SocialSisterYi <1440239038@qq.com>",
"license": "CC-BY-NC-4.0", "license": "CC-BY-NC-4.0",
"dependencies": {
"markdown-it-task-lists": "^2.1.1"
},
"scripts": { "scripts": {
"dev": "vuepress dev", "dev": "vuepress dev",
"build": "vuepress build" "build": "NODE_OPTIONS='--max-old-space-size=8192' vuepress build"
}, },
"devDependencies": { "devDependencies": {
"vuepress": "2.0.0-beta.67", "@vuepress/bundler-vite": "^2.0.0-rc.24",
"vuepress-plugin-copy-code2": "2.0.0-beta.237", "@vuepress/plugin-search": "^2.0.0-rc.110",
"vuepress-vite": "2.0.0-beta.67", "@vuepress/plugin-shiki": "^2.0.0-rc.110",
"@vuepress/plugin-search": "^2.0.0-beta.67" "@vuepress/theme-default": "^2.0.0-rc.110",
"markdown-it-task-lists": "^2.1.1",
"sass-embedded": "^1.89.2",
"vuepress": "^2.0.0-rc.24"
} }
} }

3198
yarn.lock

File diff suppressed because it is too large Load Diff