Support appending .html to URLs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start by tracing the existing URL lookup that resolves folders to index.html, then identify where extensionless paths and the additional header-matching and pre-compressed-asset rules are handled. The work is done when an option resolves /page to /page.html while preserving those lookup rules across all build targets.
Written by the indexing model from the issue text.
Description
Search for duplicate feature request
- I already searched, and this feature request or improvement is not a duplicate.
Feature scope
Improve existing functionality
Feature request related to a problem
I know the SWS has a mode where you can have folders with index.html and then e.g. /page would look up /page/index.html. Another very common output (in particular with modern frameworks would be /page to serve /page.html. Would be great if this would be an option as well.
Describe the solution you'd like
Enable a mode where it can check if a a URL without extension can be resolved to a html file by appending .html (and obviously applying all the additional lookup rules like header matching as well as serving pre-compressed assets).
Describe alternatives you've considered
The alternative is configuring the tools to output index.html files within folders of the page and turning of the auto appending trailing slash.
Build target
All targets
Additional context
E.g. SvelteKit static page uses the page.html output by default. And it seem to be the default for a lot of frameworks. So it would make SWS a super easy drop in solution to serve this kind of static pages.
- Dominant language
- Rust
- Stars
- 2.4k
- Forks
- 130
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from static-web-server/static-web-server
-
documentation enhancement help wanted release v2
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
static-web-server/static-web-server#711 · 3 comments ·
-
enhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
enhancement help wanted v3
Difficulty 4/5 3-5 days Newbie friendliness 45/100
static-web-server/static-web-server#735 · 3 comments ·
-
enhancement help wanted v2
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement help wanted v3
Difficulty 3/5 1-2 days Newbie friendliness 64/100
All issues in static-web-server/static-web-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100