vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.25k stars 2.14k forks source link

Improve docs for base url for public assets #4302

Open everdimension opened 1 month ago

everdimension commented 1 month ago

Description

Current docs seem to be very vague. The only thing they mention is this comment:

// if base is set, use /base/favicon.ico

I had know idea if this meant that I need to manually add the base prefix and how I would do it, or whether I have to specifically create a /base directory within my /docs folder

Linked Issues

Since there are many issues where people are confused about this (https://github.com/vuejs/vitepress/issues/1500, https://github.com/vuejs/vitepress/issues/3869, https://github.com/vuejs/vitepress/issues/1815, https://github.com/vuejs/vitepress/issues/827), I think this explanation belongs to the docs


[!TIP] The author of this PR can publish a preview release by commenting /publish below.