From efbf0731c9ee64cefa0f4cfefdfa3a3ea4ba9575 Mon Sep 17 00:00:00 2001 From: snowykami Date: Fri, 30 Aug 2024 14:29:58 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-docs.yml | 8 ++++---- docs/.vitepress/config/common.ts | 14 +++++++++----- docs/zh/guide/index.md | 10 +++++++++- mkdoc.bat | 8 ++++---- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index f0f7bd8..c5adb5f 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -40,10 +40,10 @@ jobs: - name: Setup API markdown run: |- python -m pip install litedoc - python -m litedoc mbcp -o docs/zh/api -l zh-Hans - python -m litedoc mbcp -o docs/en/api -l en - python -m litedoc mbcp -o docs/ja/api -l ja - python -m litedoc mbcp -o docs/zht/api -l zh-Hant + python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false + python -m litedoc mbcp -o docs/en/api -l en -f editLink=false + python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false + python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false - name: 安装 pnpm uses: pnpm/action-setup@v2 diff --git a/docs/.vitepress/config/common.ts b/docs/.vitepress/config/common.ts index e7df512..eb5c263 100644 --- a/docs/.vitepress/config/common.ts +++ b/docs/.vitepress/config/common.ts @@ -9,10 +9,10 @@ let defaultLocale = 'zh'; const commonSidebarOptions = { collapsed: true, convertSameNameSubFileToGroupIndexPage: true, - useFolderTitleFromIndexFile: true, - useFolderLinkFromIndexFile: true, useTitleFromFrontmatter: true, useTitleFromFileHeading: true, + useFolderTitleFromIndexFile: true, + useFolderLinkFromIndexFile: true, includeFolderIndexFile: true, } export const common = defineConfig({ @@ -21,9 +21,6 @@ export const common = defineConfig({ markdown: { math: true }, - vite: { - plugins: [], - }, rewrites: { [`${defaultLocale}/:rest*`]: ":rest*", }, @@ -52,6 +49,13 @@ export const common = defineConfig({ socialLinks: [ {icon: 'github', link: 'https://github.com/snowykami/mbcp'} ], + editLink: { + pattern: 'https://github.com/snowykami/mbcp/tree/main/docs/:path' + }, + aside: true , + }, + sitemap: { + hostname: 'https://mbcp.sfkm.me' }, locales: { root: {label: "简体中文", ...zh}, diff --git a/docs/zh/guide/index.md b/docs/zh/guide/index.md index ff1ece4..f1a4ffc 100644 --- a/docs/zh/guide/index.md +++ b/docs/zh/guide/index.md @@ -1,3 +1,11 @@ # 开始不了一点 -$\int_{1}^{2} x111$ \ No newline at end of file +$\int_{1}^{2} x111$ + +# AAA + +### BBB + +# C + +### ddd \ No newline at end of file diff --git a/mkdoc.bat b/mkdoc.bat index 682b305..8c233eb 100644 --- a/mkdoc.bat +++ b/mkdoc.bat @@ -1,4 +1,4 @@ -python -m litedoc mbcp -o docs/zh/api -l zh-Hans -python -m litedoc mbcp -o docs/en/api -l en -python -m litedoc mbcp -o docs/ja/api -l ja -python -m litedoc mbcp -o docs/zht/api -l zh-Hant \ No newline at end of file +python -m litedoc mbcp -o docs/zh/api -l zh-Hans -f editLink=false +python -m litedoc mbcp -o docs/en/api -l en -f editLink=false +python -m litedoc mbcp -o docs/ja/api -l ja -f editLink=false +python -m litedoc mbcp -o docs/zht/api -l zh-Hant -f editLink=false \ No newline at end of file