benzwu
1
Currently the section list of content page title (.Title) is taken from section name + s.
content/postingan/index.html
the page title is Postingans
It makes sense for english sites, for other language, it is a nuisance. Should be overridable.
Or we have a workaround on this?
benzwu
3
I can’t find how to override .Title and have to process .Title and overide all partials, but hey, it works.
{{ if .IsNode}} {{substr .Title 0 -1}}{{end}}
While playing with substr, this produce with similar result
{{ substr .Title 0 (sub (len .Title) 1) }}
but, if with slicestr,
{{ substr .Title 0 (sub (len .Title) 1) }}
got this error
executing "theme/_default/list.html" at <1>: wrong type for value; expected int; got int64
should I raise an issue for this in github?
bep
4
Config to turn off plural:
# Pluralize titles in lists using inflect
pluralizeListTitles: true
About the slicestr, please open an issue.
2 Likes
benzwu
5
Wow. How can i missed that!
Thanks @bep
issue raised: https://github.com/spf13/hugo/issues/1347
juh2
6
Can I somehow turn on a i18n-ified plural? Eg. “Termin” --> “Termine” in German?