Closed sun0225SUN closed 1 month ago
https://vitepress.dev/reference/site-config#base
In my business scenario, I need to deploy the distribution files to the secondary directory of the domain. But I encountered some problems
Open the domain's secondary directory directly in the browser and it works without any problems.
https://docs.lusun.com/tcq/
But when you directly open other sub-links besides the homepage, problems arise. (Open link in new tab)
https://docs.lusun.com/tcq/basic/download.html#download
The website cannot load static files normally
Please see the bug description. The project repository is here. https://github.com/yuanze-team/tcq-docs
Load static resource files normally.
Failed to load resource: the server responded with a status of 404 (Not Found)
none
已解决,把静态资源内容放 public 目录下了。 https://vitepress.dev/guide/asset-handling#the-public-directory
Describe the bug
https://vitepress.dev/reference/site-config#base
In my business scenario, I need to deploy the distribution files to the secondary directory of the domain. But I encountered some problems
Open the domain's secondary directory directly in the browser and it works without any problems.
https://docs.lusun.com/tcq/
But when you directly open other sub-links besides the homepage, problems arise. (Open link in new tab)
https://docs.lusun.com/tcq/basic/download.html#download
The website cannot load static files normally
Reproduction
Please see the bug description. The project repository is here. https://github.com/yuanze-team/tcq-docs
Expected behavior
Load static resource files normally.
System Info
Additional context
none
Validations