Issue with "pretty" URLs on GitLab.com
Having trouble with the "pretty" URLs setting and custom URLs.
Seems like GitLab.com is expecting pages under a site to have the .html
extension for all pages, but you can configure Jekyll to not create pages with the .html
extension. I'm trying to migrate this from GitHub Pages which has this functionality, and I'd like to keep it if possible since it's my existing link structure which has already been indexed by search engines and stuff.
Example using my own blog:
- Config file that uses URLs without the
.html
extension: https://gitlab.com/afolson/afolson.gitlab.io/blob/master/_config.yml#L15 - This link should work but 404s: http://afolson.gitlab.io/blog/2016/08/19/laracon-2016
- This link works: http://afolson.gitlab.io/blog/2016/08/19/laracon-2016.html
A clean install that I made tonight just to make sure I didn't break my site:
- Config file to use URLs without
.html
extension: https://gitlab.com/IncrediBL/incredibl.gitlab.io/blob/master/_config.yml#L19 - This link should work but 404s: http://incredibl.gitlab.io/blog/2016/08/19/welcome-to-jekyll
- This link works: http://incredibl.gitlab.io/blog/2016/08/19/welcome-to-jekyll.html
(Note that if you visit http://incredibl.gitlab.io/ and try to visit the blog post by clicking on the link it will 404 -- this is because I was too lazy to update the template, not because Pages is busted.)
The Jekyll docs have some more infomation on this: https://jekyllrb.com/docs/permalinks/#extensionless-permalinks
This might be user error on my end, if so please educate me! :P