How can I stop section title from showing up as plural?

I have a section called Music and my header partial is always making {{ .Title }} show up as plural on the section indexes. In most cases that is OK, but for Music, it shows up as Musics. How do I prevent the pluralization of {{ .Title }}?

I’m probably missing something in the docs. I’m hoping someone can help me figure out how to prevent that s. Thanks.

5 Likes

In config:

pluralizelisttitles: "false"

Also the command

hugo config

Is useful.

pluralizelisttitles should be default false in 0.13 if my memory is correct …

5 Likes

Thanks bjornerik! Was looking in the wrong place I guess.

I’ve tried putting pluralizelisttitles = "false" in my main config.toml file and in the theme.toml file and it doesn’t work. Am I doing something wrong? Should I put it somewhere else?
Thx!

Try

pluralizelisttitles = false

(without the quotes) My bad as this was my suggestion.

3 Likes

Worked!
Thanks bjornerik.

I have a pickle with this one (using Ananke theme):
I added pluralizelisttitles = false to my config.toml
and yet when I run
hugo config
the result is

pluralizelisttitles = true
Am I missing something vis-a-vié the syntax?

Are you using any theme components whose configuration might overwrite your project’s? Or the other way around I guess :slight_smile:

If Ananke theme itself isn’t doing any witchcraft, but I haven’t made any such changes. Looking at the output of config:

hugo config | grep plura
indexes = map[dateformat:02.01.2006 defaultcontentlanguage:fi pluralizelisttitles:false archive:arkistot googleanalytics: paginate:3 category:aihealueet sectionpagesmenu:main tag:avainsanat enablerobotstxt:true]
pluralizelisttitles = true
taxonomies = map[category:aihealueet sectionpagesmenu:main tag:avainsanat enablerobotstxt:true dateformat:02.01.2006 defaultcontentlanguage:fi pluralizelisttitles:false archive:arkistot googleanalytics: paginate:3]

It seems that the false selector is partially there, but it’s certainly not getting the extra s from the titles. As a first help I decided to ´´´{{ trim .Title “s” }}´´´

This pluralizing is a very disturbing feature in many languages. At least if it won’t turn off :wink: at beck and call.

hugo version
Hugo Static Site Generator v0.44/extended darwin/amd64 BuildDate: unknown

This is good idea. Because extra “s” default is looks weid for non english website.

This topic was automatically closed after 19 hours. New replies are no longer allowed.