From 6d4b62998db65909a53e0508951fc432a760dc49 Mon Sep 17 00:00:00 2001 From: Mateusz7410 Date: Sun, 5 Jul 2026 21:31:50 +0000 Subject: [PATCH] fix: enable clean URLs for docs site Re-enable cleanUrls in VitePress so internal links drop the .html suffix, and turn on Vercel cleanUrls so pages serve at the clean path and .html requests 308-redirect to it. Fixes blank pages when a doc URL is opened without the .html suffix (e.g. from release notes). --- vercel.json | 3 ++- website/.vitepress/config.mts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index b603a41..ef48b34 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,6 @@ { "buildCommand": "npm run docs:build", "outputDirectory": "website/.vitepress/dist", - "installCommand": "npm install" + "installCommand": "npm install", + "cleanUrls": true } diff --git a/website/.vitepress/config.mts b/website/.vitepress/config.mts index ea6f301..ca81b63 100644 --- a/website/.vitepress/config.mts +++ b/website/.vitepress/config.mts @@ -4,6 +4,7 @@ import { defineConfig } from 'vitepress'; export default defineConfig({ title: 'Async Lib', description: 'Async Lib Documentation', + cleanUrls: true, head: [ ['link', { rel: 'icon', href: '/favicon.ico' }], [