Closed CosmoLau closed 4 months ago
You can also have HTML in the src/pages/
folder. Did you try that? We don't do routing in the public/
folder which is why you aren't seeing it work the way you'd like.
You can also have HTML in the
src/pages/
folder. Did you try that? We don't do routing in thepublic/
folder which is why you aren't seeing it work the way you'd like.
The content I want to put in the public/
directory is not just a simple HTML
file, if I put it in src/pages/
it warns me Unsupported file type D:\**\settings.json found. Prefix filename with an Prefix filename with an underscore (
_) to ignore.
and it won't run.
How do I ignore an entire folder in src/pages/
without changing the filename?
Well you would just put the pages in src/pages/*.html
, all non-pages leave in public.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I want to put static sites generated by other frameworks in the
public/
directory, but thetrailingSlash: “ignore”
configuration does not work in thepublic/
directory in the dev environment. So I have to add/index.html
to access pages in thepublic/
directory.The project is fine after the build, this only happens in dev environments.
What's the expected result?
The
trailingSlash: “ignore”
configuration is also supported for thepublic/
directory in dev environments.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-i3ueaq-ywej2r?file=src%2Fpages%2Findex.astro
Participation