Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support serving extensionless HTML pages #1039

Open
omentic opened this issue Jul 23, 2024 · 2 comments
Open

Support serving extensionless HTML pages #1039

omentic opened this issue Jul 23, 2024 · 2 comments
Labels

Comments

@omentic
Copy link

omentic commented Jul 23, 2024

The live Hakyll server is helpful and behaves exactly as one would expect it to. But one thing that static site hosts ex. Github Pages, Neocities often do is serve a file **/foo.html at both **/foo.html and **/foo: as the .html is usually redundant.

It would be nice for the default Hakyll server to support this. I believe there's a way to add this functionality in, but it would be convenient to have direct support so that a site that uses .html-less links can be navigable with the included server.

@omentic omentic changed the title server does not support serving html files without their extension Support serving extensionless HTML pages Jul 23, 2024
@Minoru
Copy link
Collaborator

Minoru commented Jul 25, 2024

I think we could add the linked helper function into Hakyll (if the code's author is ok with this), but I'd be against enabling this by default. Nginx, Apache, and even the new-fangled Caddy require manually configuring this. Are you aware of any semi-popular webservers that do this by default? Tying our default config to a specific host isn't something that I'd be in favour of doing.

@Minoru Minoru added the feature label Jul 25, 2024
@omentic
Copy link
Author

omentic commented Jul 25, 2024

I'm not aware of any webservers that do it by default, no: just the hosts themselves (though most hosts seem to do so).

It would be really cool if it could be a flag to site watch! Not changing the default config makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants