Disable Netlify's Pretty URLs feature and add redirects to avoid breaking links to your site.
Followup to my rant on Twitter.
- Turn off Pretty URLs on Netlify under Siteconfiguration > Build & deploy > Post processing > Pretty URLs
- Build the site locally, by running
jekyll build
. - Run
for url in $(find _site -name "*.html" -not -name "index.html"); do echo "$(echo $url | sed s,_site,, | sed s/.html//) $(echo $url | sed s,_site,,)"; done >> _redirects
- Run
for url in $(find _site -name index.html -not -path _site/index.html); do echo "$(echo $url | sed s,_site,, | sed s,/index.html,,) $(echo $url | sed s,_site,,)"; done >> _redirects
- Commit and push
_redirects
.