openpatch / hyperbook

Hyperbook is a quick and easy way to build interactive workbooks, that support modern standards and runs superfast.
https://hyperbook.openpatch.org
MIT License
33 stars 7 forks source link

Do not assume webserver config #846

Closed xeruf closed 5 months ago

xeruf commented 11 months ago

In https://github.com/openpatch/hyperbook/issues/215 we had the issue already: The webserver config has to implicitly add the .html suffix to any requested site, which makes for nice URLs but requires custom webserver configuration. Can we have an option for it to work with a standard file-serving webserver?

mikebarkmin commented 11 months ago

I'm trying to investigate possible solutions to the problem.

One solution might be to use directories with index.html for every page. This would be an easy implementation.

├── elements
│   ├── alert
│   │   └── index.html
│   ├── archive
│   │   └── index.html
│   ├── audio
│   │   └── index.html
│   ├── bitflow
│   │   └── index.html
│   ├── bookmarks
│   │   └── index.html
│   ├── collapsible
│   │   └── index.html
│   ├── download
│   │   └── index.html
│   ├── embed
│   │   └── index.html
│   ├── emoji
│   │   └── index.html

Add an html extension to every internal link is another solution, but I am currently not sure in which places I have to make changes. So I have to look into it further.

xeruf commented 10 months ago

yeah making each page a folder sounds decent enough, don't think it should have any downsides?

mikebarkmin commented 5 months ago

Implemented in bd83e3a1a2bc49a6509dbdc15e085642100a55ff

xeruf commented 5 months ago

just fyi, using HestiaCP I was able to configure apache2 to work with the old version through adding Options +MultiViews: https://httpd.apache.org/docs/current/content-negotiation.html#negotiation