Ugly urls and cross-references


I want to deploy my site on S3 with Cloudfront. Cloudfront only has a Default Root Object (e.g. index.html) for the root of the site.

This means that the default pretty urls don’t work. Cloudfront will not serve as it does not add the default root object (index.html) to this link.

I hoped to work around this issue by using ugly urls. would be served just fine by Cloudfront.

However, none of the links work when I turn on uglyurls. For example {{< ref "post/" >}} still results in the generation of a link targeting

If I click the link, I get a 404 page not found. Adding .html to the address in the browser serves the right page, so the pages are generated correctly.

What is the right way to overcome this issue?



This is interesting since I’m currently running a site on S3, so I wonder if your issue is in the templating somewhere perhaps?

That is, since and are the same thing…