Hugo's trailing slash/

Tags: #<Tag:0x00007f73685c3e28> #<Tag:0x00007f73685c3a90>

today i learned that hugo always adds a slash to the ends of its urls, because:

spf13 commented on Sep 9, 2014

After a long debate, we discovered that the definitive correct behavior for a URL representing a directory was to end in a slash.

some hugo users don’t like this. i find this whole thing to be hilarious.

Sept 2014: How can I remove the trailing slash in pretty URLs? · Issue #492 · gohugoio/hugo · GitHub

much discussion followed. here is only a sampling, May 2017 to Aug 2018: Hugo support for URLs without a trailing slash? - feature - Hugo

in 2017 a pull request was filed and not merged:

later in 2017, someone tried again, and this pr has comments all the way to FIVE DAYS AGO:

i’m dying

betaveros commented 5 days ago

Yup, I’m still here and still consider this feature essential for me to use Hugo, now for the additional lame reason that I’ve been hosting my site with a custom build including this feature for long enough that I would like to preserve my URLs. Even more of the tests have failed to rebase (and I really didn’t even check that the ones that I did rebase are working, so I have no idea if this code works generally at all) and maybe it should be a brand new PR at this point, but I would like a signal from the core devs as to whether this feature still has a chance at being merged before proceeding.


1 Like