From e6ab63b83c8c600e9cf666672cdf29e711b94c2e Mon Sep 17 00:00:00 2001 From: Bluemangoo Date: Wed, 7 Feb 2024 22:25:37 +0800 Subject: [PATCH] clean url fix vercel --- .vitepress/config.mts | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 472bbc6..9a6b1f9 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -6,6 +6,11 @@ import { sidebar as sidebarZh } from "./locale/zh"; import * as path from "path"; export default defineConfig({ + rewrites: { + "file(.*)/index.md": ":file/index.md", + ":file(.*).md": ":file/index.md" + }, + locales: { root: { label: "English", @@ -51,13 +56,18 @@ export default defineConfig({ markdown: { math: true, - languages: [{ - id: "whirlscript", - scopeName: "source.whirlscript", - displayName: "WhirlScript", - aliases: ["wrs"], - path: path.resolve(__dirname, "extension/languages/whirlscript.tmLanguage.json") - }] + languages: [ + { + id: "whirlscript", + scopeName: "source.whirlscript", + displayName: "WhirlScript", + aliases: ["wrs"], + path: path.resolve( + __dirname, + "extension/languages/whirlscript.tmLanguage.json" + ) + } + ] }, sitemap: {