From fdb1456c697f1d0ffd5ce3c6dfba7ceebaecc807 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Mon, 15 May 2023 22:35:03 +0800 Subject: [PATCH] Fix: docs build path --- docs/.vitepress/config.ts | 8 +++++--- docs/package.json | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index ff4158e..b90bd0b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -10,7 +10,7 @@ function getMetadataFromDoc(path: string): { sidebarTitle?: string, sidebarOrder } function generateSidebarChapter(chapterDirName: string): any { - const chapterPath = `./docs/${chapterDirName}` + const chapterPath = `./${chapterDirName}` const tree = directoryTree(chapterPath) if (!tree || !tree.children) { @@ -65,8 +65,10 @@ chapters[0]['items'][0]['link'] = '/' // https://vitepress.dev/reference/site-config export default defineConfig({ - title: "Clash", - description: "Rule-based Tunnel", + title: 'Clash', + description: 'Rule-based Tunnel', + + base: '/clash/', themeConfig: { outline: 'deep', diff --git a/docs/package.json b/docs/package.json index 654efb8..aedf7be 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,8 +1,8 @@ { "scripts": { - "docs:dev": "vitepress dev docs", - "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" + "docs:dev": "vitepress dev", + "docs:build": "vitepress build", + "docs:preview": "vitepress preview" }, "devDependencies": { "@types/node": "^20.1.4",