Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"View All" categories & tags URL link broken #142

joakimvivas opened this issue Feb 20, 2018 · 4 comments


Copy link

commented Feb 20, 2018

Hi! The pages "Categories" & "Tags" when I pushed into the "View All" option the URL it's broken because the absolute URL it's not correct, example: "mydomain.comtags/tagname".


This comment has been minimized.

Copy link

commented Feb 20, 2018

I changed the 22 line into the "terms.html" file on the theme directory with this command and the URL link now it's correct:

<a href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">

<a href="{{ $.Site.LanguagePrefix | absURL }}/{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">


This comment has been minimized.

Copy link

commented Mar 9, 2018

This happened to me as well, i'm running a i18n blog, and View all rendered and, after patching the terms.html file it renders properly and


This comment has been minimized.

Copy link

commented Mar 15, 2018

@joakimvivas That suggestion could end up in the link have double slashes if .Site.LanguagePrefix already contains a string with a trailing /.

Example: If I have baseURL set to, AND if I use only the default single "en" language, .Site.LanguagePrefix will return So your suggestion will end up with something like


Instead of manually always adding that /, we can do:

.Site.LanguagePrefix | absURL | replaceRE "[^/]$" "${0}/"

, which basically adds the / as suffix if it doesn't already exist.


{{ printf "%s" ("foo" | absURL | replaceRE "[^/]$" "${0}/") | safeHTML }}  {{/* returns http://localhost:1313/foo/ */}}

{{ printf "%s" ("foo/" | absURL | replaceRE "[^/]$" "${0}/") | safeHTML }} {{/* also returns http://localhost:1313/foo/ */}}
martignoni added a commit to moodlebox/hugo-moodlebox-theme that referenced this issue May 31, 2018

This comment has been minimized.

Copy link

commented Nov 8, 2018

Thanks! This should have been fixed; if it still occurs please let me know.

@halogenica halogenica closed this Nov 8, 2018
VincentTam added a commit to VincentTam/beautifulhugo that referenced this issue Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.