From 23c0b5dd92dad6cc969cc4b03e37ea05d7e5c8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=AE=E6=96=87=E6=B6=9B?= Date: Wed, 11 Oct 2023 10:43:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20dev=20=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=20slug=20=E5=BC=95=E5=8F=91=E7=9A=84=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20&&=20=E4=BF=AE=E6=AD=A3=20nextPage=20=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E5=AE=9A=E5=90=91=E5=88=B0=E7=AC=AC=E4=B8=80=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pages.yml | 2 +- .gitignore | 3 ++- .vitepress/config.mts | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index e208708..6031af0 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -34,7 +34,7 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 - - name: Download ossutils zip + - name: Deploy to OSS run: | wget https://github.com/aliyun/ossutil/releases/download/v.1.7.17/ossutil-v1.7.17-linux-amd64.zip unzip ossutil-v1.7.17-linux-amd64.zip && cp ./ossutil-v1.7.17-linux-amd64/ossutil ${{github.workspace}}/ && chmod +x ${{github.workspace}}/ossutil diff --git a/.gitignore b/.gitignore index ce1e011..5212bbf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .vitepress/cache node_modules dist -docs \ No newline at end of file +docs +docs.json \ No newline at end of file diff --git a/.vitepress/config.mts b/.vitepress/config.mts index c598685..4deb296 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -11,7 +11,7 @@ const convertDocsToSidebars = (docs: any) => { for (const doc of docs) { let sidebar: DefaultTheme.SidebarItem = { text: doc.title, - link: 'docs/' + doc.slug, + link: '/docs/' + doc.slug + '.html', }; if (doc.children.length > 0) { sidebar.items = convertDocsToSidebars(doc.children); @@ -30,7 +30,8 @@ export default defineConfig({ title: "Longbridge Pro Releases", description: "Longbridge Pro Releases", ignoreDeadLinks: true, - cleanUrls: true, + // cleanUrl 配合 vx.x.x.html 在 dev 模式下有 bug ,会出现无法访问的情况,暂时关闭,等 vitepress 更新版本解决 + // cleanUrls: true, srcExclude: ['SUMMARY.md'], themeConfig: { // https://vitepress.dev/reference/default-theme-config