ladit / astro-blog-zozo

An opinionated and neat blog template built with Astro.
https://astro-blog-zozo.pages.dev
MIT License
47 stars 19 forks source link

Vercel部署问题 #2

Closed Xiaozuoyi closed 7 months ago

Xiaozuoyi commented 7 months ago

I'm using Vercel for project deployment, but I can't make route jumps. It will just get a 404 error. CleanShot 2024-03-28 at 22 50 33@2x

ladit commented 7 months ago

We have build: { format: 'file' } in astro.config.mjs so pages are built to foo.html (this is required by astro-pagefind). Vercel will not route /foo to /foo.html automatically. Add { "cleanUrls": true } in vercel.json fixes the problem according to this doc. Fixed in this commit.