hugo: Links missing trailing slash

Nice work on the new version. One small nit:

Since upgrading our {{ .Permalink }} links are missing the trailing slash. Before they were rendered as http://example.com/foo/, now /foo. Getting rid of the domain is nice, but missing the slash just introduces a useless redirect before the user is served the page.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Most upvoted comments

For nginx, I think this page has the setting needed, see the “Trying Several Options” section:

location / {
    try_files $uri $uri/ $uri.html =404;
}

But a default in Hugo which works out of the box either way would be preferable, IMO.