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:
parent
2ecfe2aa82
commit
2eae485e99
44
.github/workflows/vuepress-deploy.yml
vendored
44
.github/workflows/vuepress-deploy.yml
vendored
@ -1,18 +1,38 @@
|
||||
name: deploy and pubish
|
||||
name: deploy and publish
|
||||
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'SocialSisterYi/bilibili-API-collect'
|
||||
# if: github.repository == 'SocialSisterYi/bilibili-API-collect'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: vuepress-deploy
|
||||
uses: jenkey2011/vuepress-deploy@master
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
TARGET_REPO: SocialSisterYi/bilibili-API-collect
|
||||
TARGET_BRANCH: gh_pages
|
||||
BUILD_SCRIPT: yarn && yarn build
|
||||
BUILD_DIR: .vuepress/dist/
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4.0.3
|
||||
with:
|
||||
node-version: 22
|
||||
cache: yarn
|
||||
- name: Build with yarn
|
||||
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
|
||||
|
||||
@ -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);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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)
|
||||
- Telegram 交流群:[@bilibili_API_collect_community](https://t.me/bilibili_API_collect_community)
|
||||
|
||||
::: tip ✅提示
|
||||
::: tip 提示
|
||||
|
||||
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 及其相关社群中**禁止**询问讨论 风控解除、爬虫(采集)、破解、漏洞利用、买卖代码和账号 相关内容,抵制基于本项目进行的一切黑产行为!
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
::: warning ⚠️声明
|
||||
::: warning 声明
|
||||
|
||||
1. 本项目遵守 CC-BY-NC 4.0 协议,禁止一切商业使用,如需转载请注明作者 ID
|
||||
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#)
|
||||
- [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
|
||||
|
||||
<style scoped>
|
||||
.shields a {
|
||||
margin: auto .5em;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2157,7 +2157,7 @@ type===106
|
||||
|
||||
<details>
|
||||
<summary>查看消息示例:</summary>
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"cmd": "ONLINE_RANK_V2",
|
||||
@ -2225,7 +2225,7 @@ type===106
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
#### 未登录通知 (LOG_IN_NOTICE)
|
||||
|
||||
16
package.json
16
package.json
@ -4,17 +4,17 @@
|
||||
"repository": "https://github.com/SocialSisterYi/bilibili-API-collect.git",
|
||||
"author": "SocialSisterYi <1440239038@qq.com>",
|
||||
"license": "CC-BY-NC-4.0",
|
||||
"dependencies": {
|
||||
"markdown-it-task-lists": "^2.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vuepress dev",
|
||||
"build": "vuepress build"
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=8192' vuepress build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vuepress": "2.0.0-beta.67",
|
||||
"vuepress-plugin-copy-code2": "2.0.0-beta.237",
|
||||
"vuepress-vite": "2.0.0-beta.67",
|
||||
"@vuepress/plugin-search": "^2.0.0-beta.67"
|
||||
"@vuepress/bundler-vite": "^2.0.0-rc.24",
|
||||
"@vuepress/plugin-search": "^2.0.0-rc.110",
|
||||
"@vuepress/plugin-shiki": "^2.0.0-rc.110",
|
||||
"@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"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user