Currently, aliases defined without .html extensions have “.html” appended to their paths.
Could aliases defined with “.htm” extensions not have “.html” appended?
This would require a change to hugolib/site_render.go : in release 0.76.4, line 354 would need to be changed from:
if s.UglyURLs && !strings.HasSuffix(a, ".html") {
to:
if s.UglyURLs && !strings.HasSuffix(a, “.html”) && !strings.HasSuffix(a, “.htm”) {
It would be useful to me because some websites link to an earlier incarnation of my current website which is built with Hugo ( https://www.surreyopera.org ).
That simply tries to give all generated HTML files a .htm extension,
which is not what I need.
I simply want to be able to define aliases with a .htm extension. But
Hugo wants to append “.html” to the “.htm” extension that I specify. I
would think that other sites have the same requirement.
Appending “.html” to aliases without a “.html” suffix is hard coded in
hugolib/site_render.go if uglyURLs is defined as true.
I ireally don’t see the point in appending any suffix to alias names.
I currently fix it with a one line shell script, but that is nasty.