Remove html extension from pages on test server. #2021
Closed
Description
On Github Pages it already works: I can create a page with path /pagetitle.html
, and use URL /pagetitle
(without .html
).
The problem is that to do that I have to setup all my links without the .html
, which breaks the links on the test server.
For posts, this is already possible with permalink: /:title
.
Is there any way to do it for pages also?
Workarounds:
-
use posts instead of pages. Not satisfactory because:
- it requires you to use an unwanted date prefix Allow post filenames to have no date #484 , which is not going to change
- it forces all your posts to be of
/:title
format.
-
put the file in a folder with the desired name and rename it as
index.html
.Too much boilerplate.
-
use Apache and play with
.htaccess
.Requires to install and setup Apache...
Related discussions:
- Generating URLs without .html extensions #156: seems to focus on Posts, not Pages as this issue, and was closed after the
permalink: /:title
solution came up, but this does not yet work for pages. - How did you make Jekyll do standalone pages without the .html extension? holman/ama#231: stuck with the index workaround