From 60e3a9452a66ce8c305e590bc56fd076002149cb Mon Sep 17 00:00:00 2001 From: luooooob Date: Tue, 17 Oct 2023 02:45:36 +0800 Subject: [PATCH 1/5] Add docs website --- .gitignore | 9 +- docs/.vitepress/config.mjs | 76 ++ docs/docfx.json | 25 + ...ge\346\230\257\344\273\200\344\271\210.md" | 200 ++++ ...11\350\243\205\346\226\271\345\274\217.md" | 1 + .../01-\347\231\273\345\275\225.md" | 1 + .../02-Event.md" | 1 + docs/index.md | 25 + docs/package.json | 14 + docs/pnpm-lock.yaml | 866 ++++++++++++++++++ 10 files changed, 1217 insertions(+), 1 deletion(-) create mode 100644 docs/.vitepress/config.mjs create mode 100644 docs/docfx.json create mode 100644 "docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/01-Lagrange\346\230\257\344\273\200\344\271\210.md" create mode 100644 "docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/02-\345\256\211\350\243\205\346\226\271\345\274\217.md" create mode 100644 "docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/01-\347\231\273\345\275\225.md" create mode 100644 "docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/02-Event.md" create mode 100644 docs/index.md create mode 100644 docs/package.json create mode 100644 docs/pnpm-lock.yaml diff --git a/.gitignore b/.gitignore index ed5f2c14d..be3ded7fa 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,11 @@ obj/ /packages/ riderModule.iml /_ReSharper.Caches/ -Lagrange.Core/Utility/Crypto/Provider/Dandelion/*.cs \ No newline at end of file +Lagrange.Core/Utility/Crypto/Provider/Dandelion/*.cs + +.DS_Store +.vscode/ +docs/node_modules +docs/.vitepress/dist +docs/.vitepress/cache +docs/api \ No newline at end of file diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs new file mode 100644 index 000000000..3ecb08b17 --- /dev/null +++ b/docs/.vitepress/config.mjs @@ -0,0 +1,76 @@ +import { defineConfig } from 'vitepress' +import { readdirSync, readFileSync } from 'node:fs' +import path from 'node:path' +import YAML from 'yaml' + +const rootpath = new URL('../', import.meta.url).pathname + +function docsToItems(dirnames) { + return readdirSync(path.join(rootpath, ...dirnames), { withFileTypes: true }) + .filter(d => /^\d{2}-/g.test(d.name)) + .map(d => { + if (d.name.endsWith('.md')) { + return { + text: /(?<=\d{2}-).*(?=\.md)/g.exec(d.name), + link: path.join(...dirnames, d.name) + } + } + if (d.isDirectory) { + return { + text: /(?<=\d{2}-).*/g.exec(d.name), + items: docsToItems([...dirnames, d.name]) + } + } + return {} + }) +} + +const sidebarItemsDocs = docsToItems(['docs']) + + +const toc = readFileSync(path.join(rootpath, 'api', 'toc.yml'), 'utf8') + +const apiObj = YAML.parse(toc) + + +function tocToItems(arr) { + if (arr.length > 1 && !arr[0].href) { + return tocToItems([{ ...arr[0], items: arr.slice(1) }]) + } + return arr.map(obj => { + let item = { + text: obj.name, + } + if (obj.items) { + item.items = tocToItems(obj.items) + } + if (obj.href) { + item.link = `api/${obj.href}` + } + return item + }) +} + +const sidebarItemsApi = tocToItems(apiObj) + + +function findFirst(items) { + return items[0]?.link || findFirst(items[0].items) || '/' +} + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + title: "Lagrange", + description: "基于 QQNT 协议的高效率机器人库", + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: '文档', link: findFirst(sidebarItemsDocs) }, + { text: 'API 参考', link: findFirst(sidebarItemsApi) } + ], + sidebar: { + '/docs/': sidebarItemsDocs, + '/api/': sidebarItemsApi + } + } +}) diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 000000000..4d631d554 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,25 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "Lagrange.Core/Lagrange.Core.csproj" + ], + "src": "../" + } + ], + "dest": "api", + "output": ".", + "outputFormat": "markdown", + "includePrivateMembers": false, + "disableGitFeatures": false, + "disableDefaultFilter": false, + "noRestore": false, + "namespaceLayout": "flattened", + "memberLayout": "samePage", + "EnumSortOrder": "alphabetic", + "allowCompilationErrors": false + } + ] +} \ No newline at end of file diff --git "a/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/01-Lagrange\346\230\257\344\273\200\344\271\210.md" "b/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/01-Lagrange\346\230\257\344\273\200\344\271\210.md" new file mode 100644 index 000000000..42342b777 --- /dev/null +++ "b/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/01-Lagrange\346\230\257\344\273\200\344\271\210.md" @@ -0,0 +1,200 @@ +# Lagrange 是什么 + +## Features List +| Protocol | Support | Login | Support | Messages | Support | Operations | Support | Events | Support | +|----------|---------|---------------------------|---------|:-----------------|:-----------|:------------------|:-----------|:-----------------------|:--------| +| Windows | 🟢 | QrCode | 🟢 | Images | 🟢 | ~~Poke~~ | 🔴 | Captcha | 🟢 | +| macOS | 🟢 | Password | 🟢 | Text / At | 🟢 | Recall | 🟡 | BotOnline | 🟢 | +| Linux | 🟢 | EasyLogin | 🟢 | ~~Records~~ | 🔴 | Leave Group | 🔴 | BotOffline | 🟢 | +| | | UnusalDevice
Password | 🔴 | QFace | 🟢 | ~~Special Title~~ | 🔴 | Message | 🟢 | +| | | UnusalDevice
Easy | 🟢 | Json | 🟡 | Kick Member | 🟢 | ~~Poke~~ | 🔴 | +| | | NewDeviceVerify | 🔴 | Xml | 🟢 | Mute Member | 🟢 | MessageRecall | 🔴 | +| | | | | Forward | 🟢 | Set Admin | 🟢 | GroupMemberDecrease | 🟢 | +| | | | | Video | 🔴 | Friend Request | 🔴 | GroupMemberIncrease | 🟢 | +| | | | | ~~Flash Image~~ | 🔴 | Group Request | 🔴 | GroupPromoteAdmin | 🟢 | +| | | | | Reply | 🟢 | ~~Voice Call~~ | 🔴 | GroupInvite | 🟢 | +| | | | | File | 🟡 | Client Key | 🟢 | GroupRequestJoin | 🔴 | +| | | | | | | Cookies | 🟢 | FriendRequest | 🔴 | +| | | | | | | Send Message | 🟢 | ~~FriendTyping~~ | 🔴 | +| | | | | | | | | ~~FriendVoiceCall~~ | 🔴 | + +## OneBot-11 + +### Implementation + +
+Message Segement + +| Message Segement| Support | +| ------------ | ------------| +| [Text] | 🟢 | +| [Face] | 🟢 | +| [Image] | 🟢 | +| [Record] | 🔴 | +| [Video] | 🔴 | +| [At] | 🟢 | +| [Rps] | 🔴 | +| [Dice] | 🔴 | +| [Shake] | 🔴 | +| [Poke] | 🔴 | +| [Anonymous] | 🔴 | +| [Share] | 🔴 | +| [Contact] | 🔴 | +| [Location] | 🔴 | +| [Music] | 🔴 | +| [Reply] | 🔴 | +| [Forward] | 🔴 | +| [Node] | 🔴 | +| [Xml] | 🔴 | +| [Json] | 🔴 | + +[Text]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#qq-%E8%A1%A8%E6%83%85 +[Record]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E8%AF%AD%E9%9F%B3 +[Face]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#qq-%E8%A1%A8%E6%83%85 +[Image]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%9B%BE%E7%89%87 +[Shake]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%AA%97%E5%8F%A3%E6%8A%96%E5%8A%A8%E6%88%B3%E4%B8%80%E6%88%B3- +[Poke]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%88%B3%E4%B8%80%E6%88%B3 +[Anonymous]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%8C%BF%E5%90%8D%E5%8F%91%E6%B6%88%E6%81%AF- +[Location]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E4%BD%8D%E7%BD%AE +[Video]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%9F%AD%E8%A7%86%E9%A2%91 +[At]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%9F%90%E4%BA%BA +[Rps]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%8C%9C%E6%8B%B3%E9%AD%94%E6%B3%95%E8%A1%A8%E6%83%85 +[Dice]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%8E%B7%E9%AA%B0%E5%AD%90%E9%AD%94%E6%B3%95%E8%A1%A8%E6%83%85 +[share]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E9%93%BE%E6%8E%A5%E5%88%86%E4%BA%AB +[Music]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E9%9F%B3%E4%B9%90%E5%88%86%E4%BA%AB- +[Contact]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E6%8E%A8%E8%8D%90%E5%A5%BD%E5%8F%8B +[Reply]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%9B%9E%E5%A4%8D +[Forward]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91- +[Node]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E8%8A%82%E7%82%B9- +[Xml]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#xml-%E6%B6%88%E6%81%AF +[Json]: https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#json-%E6%B6%88%E6%81%AF + +
+ +
+API + +| API | Support | +| ------------------------ | -------- | +| [/send_private_msg] | 🔴 | +| [/send_group_msg] | 🔴 | +| [/send_msg] | 🟢 | +| [/delete_msg] | 🔴 | +| [/get_msg] | 🔴 | +| [/get_forward_msg] | 🔴 | +| ~~[/send_like]~~ | 🔴 | +| [/set_group_kick] | 🟢 | +| [/set_group_ban] | 🟢 | +| [/set_group_anonymous_ban] | 🔴 | +| [/set_group_whole_ban] | 🟢 | +| [/set_group_admin] | 🟢 | +| [/set_group_anonymous] | 🔴 | +| [/set_group_card] | 🟢 | +| [/set_group_name] | 🟢 | +| [/set_group_leave] | 🔴 | +| [/set_group_special_title] | 🔴 | +| [/set_friend_add_request] | 🔴 | +| [/set_group_add_request] | 🔴 | +| [/get_login_info] | 🟢 | +| [/get_stranger_info] | 🔴 | +| [/get_friend_list] | 🔴 | +| [/get_group_info] | 🟢 | +| [/get_group_list] | 🟢 | +| [/get_group_member_info] | 🔴 | +| [/get_group_member_list] | 🔴 | +| [/get_group_honor_info] | 🔴 | +| [/get_cookies] | 🔴 | +| [/get_csrf_token] | 🔴 | +| [/get_credentials] | 🔴 | +| [/get_record] | 🔴 | +| [/get_image] | 🔴 | +| [/can_send_image] | 🔴 | +| [/can_send_record] | 🔴 | +| [/get_status] | 🔴 | +| [/get_version_info] | 🟢 | +| [/set_restart] | 🔴 | +| [/clean_cache] | 🔴 | + +[/send_private_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_private_msg-%E5%8F%91%E9%80%81%E7%A7%81%E8%81%8A%E6%B6%88%E6%81%AF +[/send_group_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_group_msg-%E5%8F%91%E9%80%81%E7%BE%A4%E6%B6%88%E6%81%AF +[/send_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_msg-发送消息 +[/delete_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#delete_msg-撤回消息 +[/get_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_msg-获取消息 +[/get_forward_msg]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_forward_msg-获取合并转发消息 +[/send_like]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_like-发送好友赞 +[/set_group_kick]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_kick-群组踢人 +[/set_group_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_ban-群组单人禁言 +[/set_group_anonymous_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_anonymous_ban-群组匿名用户禁言 +[/set_group_whole_ban]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_whole_ban-群组全员禁言 +[/set_group_admin]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_admin-群组设置管理员 +[/set_group_anonymous]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_anonymous-群组匿名 +[/set_group_card]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_card-设置群名片群备注 +[/set_group_name]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_name-设置群名 +[/set_group_leave]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_leave-退出群组 +[/set_group_special_title]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_special_title-设置群组专属头衔 +[/set_friend_add_request]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_friend_add_request-处理加好友请求 +[/set_group_add_request]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_add_request-处理加群请求邀请 +[/get_login_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_login_info-获取登录号信息 +[/get_stranger_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_stranger_info-获取陌生人信息 +[/get_friend_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_friend_list-获取好友列表 +[/get_group_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_info-获取群信息 +[/get_group_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_list-获取群列表 +[/get_group_member_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_member_info-获取群成员信息 +[/get_group_member_list]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_member_list-获取群成员列表 +[/get_group_honor_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_group_honor_info-获取群荣誉信息 +[/get_cookies]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_cookies-获取-cookies +[/get_csrf_token]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_csrf_token-获取-csrf-token +[/get_credentials]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_credentials-获取-qq-相关接口凭证 +[/get_record]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_record-获取语音 +[/get_image]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_image-获取图片 +[/can_send_image]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#can_send_image-检查是否可以发送图片 +[/can_send_record]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#can_send_record-检查是否可以发送语音 +[/get_status]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_status-获取运行状态 +[/get_version_info]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_version_info-获取版本信息 +[/set_restart]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_restart-重启-onebot-实现 +[/clean_cache]: https://github.com/botuniverse/onebot-11/blob/master/api/public.md#clean_cache-清理缓存 + +
+ +
+Event + +| PostType| EventName | Support | +| --------| -----------------------------|----------| +| Message | [Private Message] | 🔴 | +| Message | [Group Message] | 🟢 | +| Notice | [Group File Upload] | 🔴 | +| Notice | [Group Admin Change] | 🔴 | +| Notice | [Group Member Decrease] | 🔴 | +| Notice | [Group Member Increase] | 🔴 | +| Notice | [Group Mute] | 🔴 | +| Notice | [Friend Add] | 🔴 | +| Notice | [Group Recall Message] | 🔴 | +| Notice | [Friend Recall Message] | 🔴 | +| Notice | [Group Poke] | 🔴 | +| Notice | [Group red envelope luck king]| 🔴 | +| Notice | [Group Member Honor Changed] | 🔴 | +| Request| [Add Friend Request] | 🔴 | +| Request| [Group Request/Invitations] | 🔴 | +| Meta | [LifeCycle] | 🟢 | +| Meta | [Heartbeat] | 🟢 | + +[Private Message]: https://github.com/botuniverse/onebot-11/blob/master/event/message.md#%E7%A7%81%E8%81%8A%E6%B6%88%E6%81%AF +[Group Message]: https://github.com/botuniverse/onebot-11/blob/master/event/message.md#%E7%BE%A4%E6%B6%88%E6%81%AF +[Group File Upload]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0 +[Group Admin Change]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%AE%A1%E7%90%86%E5%91%98%E5%8F%98%E5%8A%A8 +[Group Member Decrease]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E5%87%8F%E5%B0%91 +[Group Member Increase]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E5%A2%9E%E5%8A%A0 +[Group Mute]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%A6%81%E8%A8%80 +[Friend Add]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E5%A5%BD%E5%8F%8B%E6%B7%BB%E5%8A%A0 +[Group Recall Message]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%B6%88%E6%81%AF%E6%92%A4%E5%9B%9E +[Friend Recall Message]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E5%A5%BD%E5%8F%8B%E6%B6%88%E6%81%AF%E6%92%A4%E5%9B%9E +[Group Poke]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E5%86%85%E6%88%B3%E4%B8%80%E6%88%B3 +[Group red envelope luck king]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E7%BA%A2%E5%8C%85%E8%BF%90%E6%B0%94%E7%8E%8B +[Group Member Honor Changed]: https://github.com/botuniverse/onebot-11/blob/master/event/notice.md#%E7%BE%A4%E6%88%90%E5%91%98%E8%8D%A3%E8%AA%89%E5%8F%98%E6%9B%B4 +[Add Friend Request]: https://github.com/botuniverse/onebot-11/blob/master/event/request.md#%E5%8A%A0%E5%A5%BD%E5%8F%8B%E8%AF%B7%E6%B1%82 +[Group Request/Invitations]: https://github.com/botuniverse/onebot-11/blob/master/event/request.md#%E5%8A%A0%E7%BE%A4%E8%AF%B7%E6%B1%82%E9%82%80%E8%AF%B7 +[LifeCycle]: https://github.com/botuniverse/onebot-11/blob/master/event/meta.md#%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F +[Heartbeat]: https://github.com/botuniverse/onebot-11/blob/master/event/meta.md#%E5%BF%83%E8%B7%B3 + +
\ No newline at end of file diff --git "a/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/02-\345\256\211\350\243\205\346\226\271\345\274\217.md" "b/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/02-\345\256\211\350\243\205\346\226\271\345\274\217.md" new file mode 100644 index 000000000..5d9d5da42 --- /dev/null +++ "b/docs/docs/01-\345\277\253\351\200\237\344\270\212\346\211\213/02-\345\256\211\350\243\205\346\226\271\345\274\217.md" @@ -0,0 +1 @@ +# 安装方式 diff --git "a/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/01-\347\231\273\345\275\225.md" "b/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/01-\347\231\273\345\275\225.md" new file mode 100644 index 000000000..0ec6c61d2 --- /dev/null +++ "b/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/01-\347\231\273\345\275\225.md" @@ -0,0 +1 @@ +# 登录 diff --git "a/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/02-Event.md" "b/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/02-Event.md" new file mode 100644 index 000000000..bdd2b86ed --- /dev/null +++ "b/docs/docs/02-\346\240\270\345\277\203\346\246\202\345\277\265/02-Event.md" @@ -0,0 +1 @@ +# Event diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..3413872fe --- /dev/null +++ b/docs/index.md @@ -0,0 +1,25 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: Lagrange + text: 基于 QQNT 协议的高效率机器人库 + tagline: 简单,高效,全平台部署,支持 OneBot 协议 + actions: + - theme: brand + text: 快速上手 + link: /docs/01-快速上手/01-Lagrange是什么 + - theme: alt + text: Github + link: https://github.com/Linwenxuan05/Lagrange.Core + +features: + - title: 接口丰富 + details: 接口完全覆盖大部分使用场景 + - title: 全平台部署 + details: 由纯 C# 编写,轻松部署到任意平台 + - title: OneBot 支持 + details: 自带 OneBot 实现,支持正向/反向 websocket,轻松接入其他项目 +--- + diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..b41c479dd --- /dev/null +++ b/docs/package.json @@ -0,0 +1,14 @@ +{ + "name": "docs", + "private": true, + "type": "module", + "scripts": { + "dev": "vitepress dev", + "build": "vitepress build", + "preview": "vitepress preview" + }, + "devDependencies": { + "vitepress": "1.0.0-rc.22", + "yaml": "^2.3.3" + } +} \ No newline at end of file diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml new file mode 100644 index 000000000..601c7aa1d --- /dev/null +++ b/docs/pnpm-lock.yaml @@ -0,0 +1,866 @@ +lockfileVersion: 5.4 + +specifiers: + vitepress: 1.0.0-rc.22 + yaml: ^2.3.3 + +devDependencies: + vitepress: 1.0.0-rc.22 + yaml: 2.3.3 + +packages: + + /@algolia/autocomplete-core/1.9.3_algoliasearch@4.20.0: + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3_algoliasearch@4.20.0 + '@algolia/autocomplete-shared': 1.9.3_algoliasearch@4.20.0 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + dev: true + + /@algolia/autocomplete-plugin-algolia-insights/1.9.3_algoliasearch@4.20.0: + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} + peerDependencies: + search-insights: '>= 1 < 3' + dependencies: + '@algolia/autocomplete-shared': 1.9.3_algoliasearch@4.20.0 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + dev: true + + /@algolia/autocomplete-preset-algolia/1.9.3_algoliasearch@4.20.0: + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + '@algolia/autocomplete-shared': 1.9.3_algoliasearch@4.20.0 + algoliasearch: 4.20.0 + dev: true + + /@algolia/autocomplete-shared/1.9.3_algoliasearch@4.20.0: + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + algoliasearch: 4.20.0 + dev: true + + /@algolia/cache-browser-local-storage/4.20.0: + resolution: {integrity: sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==} + dependencies: + '@algolia/cache-common': 4.20.0 + dev: true + + /@algolia/cache-common/4.20.0: + resolution: {integrity: sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==} + dev: true + + /@algolia/cache-in-memory/4.20.0: + resolution: {integrity: sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==} + dependencies: + '@algolia/cache-common': 4.20.0 + dev: true + + /@algolia/client-account/4.20.0: + resolution: {integrity: sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==} + dependencies: + '@algolia/client-common': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /@algolia/client-analytics/4.20.0: + resolution: {integrity: sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==} + dependencies: + '@algolia/client-common': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /@algolia/client-common/4.20.0: + resolution: {integrity: sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==} + dependencies: + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /@algolia/client-personalization/4.20.0: + resolution: {integrity: sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==} + dependencies: + '@algolia/client-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /@algolia/client-search/4.20.0: + resolution: {integrity: sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==} + dependencies: + '@algolia/client-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /@algolia/logger-common/4.20.0: + resolution: {integrity: sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==} + dev: true + + /@algolia/logger-console/4.20.0: + resolution: {integrity: sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==} + dependencies: + '@algolia/logger-common': 4.20.0 + dev: true + + /@algolia/requester-browser-xhr/4.20.0: + resolution: {integrity: sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==} + dependencies: + '@algolia/requester-common': 4.20.0 + dev: true + + /@algolia/requester-common/4.20.0: + resolution: {integrity: sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==} + dev: true + + /@algolia/requester-node-http/4.20.0: + resolution: {integrity: sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==} + dependencies: + '@algolia/requester-common': 4.20.0 + dev: true + + /@algolia/transporter/4.20.0: + resolution: {integrity: sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==} + dependencies: + '@algolia/cache-common': 4.20.0 + '@algolia/logger-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + dev: true + + /@babel/helper-string-parser/7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-identifier/7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/parser/7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/types/7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + + /@docsearch/css/3.5.2: + resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} + dev: true + + /@docsearch/js/3.5.2: + resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} + dependencies: + '@docsearch/react': 3.5.2 + preact: 10.18.1 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + dev: true + + /@docsearch/react/3.5.2: + resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + dependencies: + '@algolia/autocomplete-core': 1.9.3_algoliasearch@4.20.0 + '@algolia/autocomplete-preset-algolia': 1.9.3_algoliasearch@4.20.0 + '@docsearch/css': 3.5.2 + algoliasearch: 4.20.0 + transitivePeerDependencies: + - '@algolia/client-search' + dev: true + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@jridgewell/sourcemap-codec/1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@types/linkify-it/3.0.3: + resolution: {integrity: sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==} + dev: true + + /@types/markdown-it/13.0.2: + resolution: {integrity: sha512-Tla7hH9oeXHOlJyBFdoqV61xWE9FZf/y2g+gFVwQ2vE1/eBzjUno5JCd3Hdb5oATve5OF6xNjZ/4VIZhVVx+hA==} + dependencies: + '@types/linkify-it': 3.0.3 + '@types/mdurl': 1.0.3 + dev: true + + /@types/mdurl/1.0.3: + resolution: {integrity: sha512-T5k6kTXak79gwmIOaDF2UUQXFbnBE0zBUzF20pz7wDYu0RQMzWg+Ml/Pz50214NsFHBITkoi5VtdjFZnJ2ijjA==} + dev: true + + /@types/web-bluetooth/0.0.18: + resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==} + dev: true + + /@vue/compiler-core/3.3.4: + resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-dom/3.3.4: + resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} + dependencies: + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /@vue/compiler-sfc/3.3.4: + resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/compiler-core': 3.3.4 + '@vue/compiler-dom': 3.3.4 + '@vue/compiler-ssr': 3.3.4 + '@vue/reactivity-transform': 3.3.4 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + magic-string: 0.30.5 + postcss: 8.4.31 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-ssr/3.3.4: + resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} + dependencies: + '@vue/compiler-dom': 3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /@vue/devtools-api/6.5.1: + resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} + dev: true + + /@vue/reactivity-transform/3.3.4: + resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + magic-string: 0.30.5 + dev: true + + /@vue/reactivity/3.3.4: + resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} + dependencies: + '@vue/shared': 3.3.4 + dev: true + + /@vue/runtime-core/3.3.4: + resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} + dependencies: + '@vue/reactivity': 3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /@vue/runtime-dom/3.3.4: + resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==} + dependencies: + '@vue/runtime-core': 3.3.4 + '@vue/shared': 3.3.4 + csstype: 3.1.2 + dev: true + + /@vue/server-renderer/3.3.4_vue@3.3.4: + resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==} + peerDependencies: + vue: 3.3.4 + dependencies: + '@vue/compiler-ssr': 3.3.4 + '@vue/shared': 3.3.4 + vue: 3.3.4 + dev: true + + /@vue/shared/3.3.4: + resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} + dev: true + + /@vueuse/core/10.5.0_vue@3.3.4: + resolution: {integrity: sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A==} + dependencies: + '@types/web-bluetooth': 0.0.18 + '@vueuse/metadata': 10.5.0 + '@vueuse/shared': 10.5.0_vue@3.3.4 + vue-demi: 0.14.6_vue@3.3.4 + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + + /@vueuse/integrations/10.5.0_focus-trap@7.5.4+vue@3.3.4: + resolution: {integrity: sha512-fm5sXLCK0Ww3rRnzqnCQRmfjDURaI4xMsx+T+cec0ngQqHx/JgUtm8G0vRjwtonIeTBsH1Q8L3SucE+7K7upJQ==} + peerDependencies: + async-validator: '*' + axios: '*' + change-case: '*' + drauu: '*' + focus-trap: '*' + fuse.js: '*' + idb-keyval: '*' + jwt-decode: '*' + nprogress: '*' + qrcode: '*' + sortablejs: '*' + universal-cookie: '*' + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + dependencies: + '@vueuse/core': 10.5.0_vue@3.3.4 + '@vueuse/shared': 10.5.0_vue@3.3.4 + focus-trap: 7.5.4 + vue-demi: 0.14.6_vue@3.3.4 + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + + /@vueuse/metadata/10.5.0: + resolution: {integrity: sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw==} + dev: true + + /@vueuse/shared/10.5.0_vue@3.3.4: + resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==} + dependencies: + vue-demi: 0.14.6_vue@3.3.4 + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + + /algoliasearch/4.20.0: + resolution: {integrity: sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==} + dependencies: + '@algolia/cache-browser-local-storage': 4.20.0 + '@algolia/cache-common': 4.20.0 + '@algolia/cache-in-memory': 4.20.0 + '@algolia/client-account': 4.20.0 + '@algolia/client-analytics': 4.20.0 + '@algolia/client-common': 4.20.0 + '@algolia/client-personalization': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/logger-common': 4.20.0 + '@algolia/logger-console': 4.20.0 + '@algolia/requester-browser-xhr': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/requester-node-http': 4.20.0 + '@algolia/transporter': 4.20.0 + dev: true + + /ansi-sequence-parser/1.1.1: + resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==} + dev: true + + /csstype/3.1.2: + resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + dev: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + + /focus-trap/7.5.4: + resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} + dependencies: + tabbable: 6.2.0 + dev: true + + /fsevents/2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /jsonc-parser/3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + + /magic-string/0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /mark.js/8.11.1: + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + dev: true + + /minisearch/6.1.0: + resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==} + dev: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /preact/10.18.1: + resolution: {integrity: sha512-mKUD7RRkQQM6s7Rkmi7IFkoEHjuFqRQUaXamO61E6Nn7vqF/bo7EZCmSyrUnp2UWHw0O7XjZ2eeXis+m7tf4lg==} + dev: true + + /rollup/3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /shiki/0.14.5: + resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==} + dependencies: + ansi-sequence-parser: 1.1.1 + jsonc-parser: 3.2.0 + vscode-oniguruma: 1.7.0 + vscode-textmate: 8.0.0 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /tabbable/6.2.0: + resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + dev: true + + /to-fast-properties/2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + + /vite/4.4.11: + resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitepress/1.0.0-rc.22: + resolution: {integrity: sha512-n7le5iikCFgWMuX7sKfzDGJGlrsYQ5trG3S97BghNz2alOTr4Xp+GrB6ShwogUTX9gNgeNmrACjokhW55LNeBA==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4.3.2 + postcss: ^8.4.31 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + dependencies: + '@docsearch/css': 3.5.2 + '@docsearch/js': 3.5.2 + '@types/markdown-it': 13.0.2 + '@vue/devtools-api': 6.5.1 + '@vueuse/core': 10.5.0_vue@3.3.4 + '@vueuse/integrations': 10.5.0_focus-trap@7.5.4+vue@3.3.4 + focus-trap: 7.5.4 + mark.js: 8.11.1 + minisearch: 6.1.0 + shiki: 0.14.5 + vite: 4.4.11 + vue: 3.3.4 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' + - '@types/react' + - '@vue/composition-api' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode + - less + - lightningcss + - nprogress + - qrcode + - react + - react-dom + - sass + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - universal-cookie + dev: true + + /vscode-oniguruma/1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + dev: true + + /vscode-textmate/8.0.0: + resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} + dev: true + + /vue-demi/0.14.6_vue@3.3.4: + resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.3.4 + dev: true + + /vue/3.3.4: + resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} + dependencies: + '@vue/compiler-dom': 3.3.4 + '@vue/compiler-sfc': 3.3.4 + '@vue/runtime-dom': 3.3.4 + '@vue/server-renderer': 3.3.4_vue@3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /yaml/2.3.3: + resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} + engines: {node: '>= 14'} + dev: true From ed47a3fb0ee4d352ad14100a3aedb4f20395271a Mon Sep 17 00:00:00 2001 From: luooooob Date: Tue, 17 Oct 2023 03:23:19 +0800 Subject: [PATCH 2/5] Add gh-pages.yml --- .github/workflows/gh-pages.yml | 68 ++++++++++++++++++++++++++++++++++ docs/.vitepress/config.mjs | 25 +++++++++---- 2 files changed, 85 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 000000000..434812314 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,68 @@ +name: Deploy document site to Pages + +on: + push: + branches: [main] + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Install docfx + run: dotnet tool install -g docfx + - name: Generate API docs + working-directory: ./docs + run: docfx metadata ./docfx.json + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 7 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Install dependencies + working-directory: ./docs + run: pnpm install + - name: Build with VitePress + working-directory: ./docs + run: pnpm build + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: docs/.vitepress/dist + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 3ecb08b17..4b2ffe709 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -27,12 +27,6 @@ function docsToItems(dirnames) { const sidebarItemsDocs = docsToItems(['docs']) - -const toc = readFileSync(path.join(rootpath, 'api', 'toc.yml'), 'utf8') - -const apiObj = YAML.parse(toc) - - function tocToItems(arr) { if (arr.length > 1 && !arr[0].href) { return tocToItems([{ ...arr[0], items: arr.slice(1) }]) @@ -51,15 +45,30 @@ function tocToItems(arr) { }) } -const sidebarItemsApi = tocToItems(apiObj) +let apiObj; +try { + const toc = readFileSync(path.join(rootpath, 'api', 'toc.yml'), 'utf8') + apiObj = YAML.parse(toc) +} catch (err) { + console.warn("未找到API文档") + apiObj = [] +} +const sidebarItemsApi = tocToItems(apiObj) function findFirst(items) { - return items[0]?.link || findFirst(items[0].items) || '/' + if (items.length > 0) { + if (items[0].link) { + return items[0].link + } + return findFirst(items[0].items) + } + return '/' } // https://vitepress.dev/reference/site-config export default defineConfig({ + base: "/Lagrange.Core", title: "Lagrange", description: "基于 QQNT 协议的高效率机器人库", themeConfig: { From 0351deaf8131e748391e22cea7a27643bb2ed98f Mon Sep 17 00:00:00 2001 From: luooooob Date: Tue, 17 Oct 2023 04:51:46 +0800 Subject: [PATCH 3/5] Add logo --- docs/.vitepress/config.mjs | 3 ++- docs/public/about.txt | 6 ++++++ docs/public/apple-touch-icon.png | Bin 0 -> 2607 bytes docs/public/favicon-16x16.png | Bin 0 -> 214 bytes docs/public/favicon-32x32.png | Bin 0 -> 299 bytes docs/public/favicon.ico | Bin 0 -> 15406 bytes 6 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/public/about.txt create mode 100644 docs/public/apple-touch-icon.png create mode 100644 docs/public/favicon-16x16.png create mode 100644 docs/public/favicon-32x32.png create mode 100644 docs/public/favicon.ico diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 4b2ffe709..718a357a1 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -71,8 +71,9 @@ export default defineConfig({ base: "/Lagrange.Core", title: "Lagrange", description: "基于 QQNT 协议的高效率机器人库", + head: [['link', { rel: 'icon', href: '/Lagrange.Core/favicon.ico' }]], themeConfig: { - // https://vitepress.dev/reference/default-theme-config + logo: '/public/apple-touch-icon.png', nav: [ { text: '文档', link: findFirst(sidebarItemsDocs) }, { text: 'API 参考', link: findFirst(sidebarItemsApi) } diff --git a/docs/public/about.txt b/docs/public/about.txt new file mode 100644 index 000000000..96ceabf75 --- /dev/null +++ b/docs/public/about.txt @@ -0,0 +1,6 @@ +This favicon was generated using the following font: + +- Font Title: Noto Sans +- Font Author: Copyright 2015-2021 Google LLC. All Rights Reserved. +- Font Source: http://fonts.gstatic.com/s/notosans/v32/o-0NIpQlx3QUlC5A4PNjXhFlY9aA5Wl6PQ.ttf +- Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)) diff --git a/docs/public/apple-touch-icon.png b/docs/public/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6e744e6b2dd1c173614b145821a6eae1efbadf5d GIT binary patch literal 2607 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 Date: Tue, 17 Oct 2023 16:32:24 +0800 Subject: [PATCH 4/5] Fix api sidebar --- docs/.vitepress/config.mjs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 718a357a1..af1e1768e 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -28,10 +28,19 @@ function docsToItems(dirnames) { const sidebarItemsDocs = docsToItems(['docs']) function tocToItems(arr) { - if (arr.length > 1 && !arr[0].href) { - return tocToItems([{ ...arr[0], items: arr.slice(1) }]) - } - return arr.map(obj => { + const [head, tail] = arr.reduce(([head, tail], x) => { + if (!x.href) { + return [[...head, tail], x] + } + if (tail.name) { + return [head, { ...tail, items: [...(tail.items || []), x] }] + } + return [[...head, x], {}] + }, [[], {}]) + + const foldArr = [...head, tail] + + return foldArr.map(obj => { let item = { text: obj.name, } @@ -56,6 +65,8 @@ try { const sidebarItemsApi = tocToItems(apiObj) +console.log(JSON.stringify(sidebarItemsApi)) + function findFirst(items) { if (items.length > 0) { if (items[0].link) { From 5f26ade467d22b1fca5996bdecbdc748d12458f0 Mon Sep 17 00:00:00 2001 From: luooooob Date: Tue, 17 Oct 2023 16:33:54 +0800 Subject: [PATCH 5/5] Fix debug logs --- docs/.vitepress/config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index af1e1768e..02da76941 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -65,7 +65,7 @@ try { const sidebarItemsApi = tocToItems(apiObj) -console.log(JSON.stringify(sidebarItemsApi)) +// console.log(JSON.stringify(sidebarItemsApi)) function findFirst(items) { if (items.length > 0) {