From d470f8ddb878b8293ccddf18a6719235dcb21030 Mon Sep 17 00:00:00 2001 From: James Aprosail Date: Sun, 23 Jun 2024 20:33:10 +0800 Subject: [PATCH] fix reposition vitepress config --- .gitignore | 4 ++-- .npmignore | 1 - {.vitepress => docs/.vitepress}/config.ts | 8 ++++---- package.json | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) rename {.vitepress => docs/.vitepress}/config.ts (78%) diff --git a/.gitignore b/.gitignore index 12db8a6..837436f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,8 @@ index.js.map index.d.ts index.cjs index.js -.vitepress/cache/ -.vitepress/dist/ +docs/.vitepress/cache/ +docs/.vitepress/dist/ # Platform specified files. .DS_Store diff --git a/.npmignore b/.npmignore index 0770005..6456779 100644 --- a/.npmignore +++ b/.npmignore @@ -6,7 +6,6 @@ yarn.lock # Repo config files. .github/ -.vitepress/ .vscode/ docs/ .gitattributes diff --git a/.vitepress/config.ts b/docs/.vitepress/config.ts similarity index 78% rename from .vitepress/config.ts rename to docs/.vitepress/config.ts index 8409571..1f4564c 100644 --- a/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,5 +1,5 @@ import {defineConfig} from "vitepress" -import {wordless} from "../index" +import {wordless} from "../../index" export default defineConfig({ markdown: { @@ -8,7 +8,7 @@ export default defineConfig({ }, }, title: "Markdown-it Wordless", - base: "./", + base: "/docs", themeConfig: { socialLinks: [ { @@ -18,11 +18,11 @@ export default defineConfig({ ], }, locales: { - root: {label: "English", lang: "en", link: "/docs"}, + root: {label: "English", lang: "en"}, zh: { label: "简体中文", lang: "zh", - link: "/docs/zh", + link: "/zh", themeConfig: { outline: {label: "目录"}, }, diff --git a/package.json b/package.json index bfd9fdf..9feebd0 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ }, "scripts": { "build": "rollup --config rollup.config.js", - "doc": "vitepress dev", - "doc.build": "npm run build && vitepress build", + "doc": "vitepress dev docs", + "doc.build": "npm run build && vitepress build docs", "format": "prettier . --write", "format.check": "prettier . --check", "prepublishOnly": "npm run review",