Make static adapter truly static
See original GitHub issueIs your feature request related to a problem? Please describe. I’m not sure if it’s a missing feature, an intended “feature” or just a bug.
Basically, I have a website with some dynamic pages (slugs) that I know at compile time. I want to generate the static pages and make them accessible via a traditional hosting (e.g. apache webserver).
The use case is a blog, where I have dynamic slugs that are fetched at build time and used to generate static pages. The problem is, though, the pages are not generated, instead are left dynamic when using the static adapter
and thus, navigating through the web pages works (starting from the root), but when accessing the page directly, this is not found.
Describe the solution you’d like
To be able to generate true static pages, creating an html
file for all routes, even the dynamic ones. If the target is to create a static website, then it should be possible to have all the pages rendered and stored independently one from another.
Basically, pages like /blog/[slug].svelte
should be translated to /blog/my-post-name.html
instead of being dynamic even when using the static adapter.
I can’t recall if it was working before the last update of the static adapter or not. I believe it was
Describe alternatives you’ve considered I don’t have other alternatives at the moment.
How important is this feature to you?
It’s quite serious, since a user who visits a dynamic page and refreshes the page by accident, gets a 404 - Not found
from the apache webserver.
Additional context Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Please provide a repro. Links in HTML should already be getting followed when crawling like in Sapper.
This is already how it works?