Closed
Description
I'm using https://surge.sh/ to deploy my hugo site. It has a great clean url feature, so if you have /foo.html
, /foo
will get it, /foo/
will redirect to /foo
.
So now I'm creating content/foo.md
, and enabling uglyurls
so hugo generates /foo.html
.
In some pages, such as listing page, I'm now using {{ trim .RelPermalink ".html" }}
to use clean url in href. However, this causes problem with hugo server. A request of /foo
doesn't check the existence of /foo.html
, but directs to /foo/
to try /foo/index.html
immediately.