The default behavior of Hugo is to pluralize list titles; hence the inflection of the
quote
section to “Quotes” when called with the.Title
page variable. You can change this via thepluralizeListTitles
directive in your site configuration.
Nice way of putting it – it only pluralizes english titles. Useless for any other language, and there are some .
I always set it to false in my sites, but I have never understood the rationale behind it…
It probably seemed like a good idea at the time—close to 10 years ago. Changing the default to false
would be a breaking change.
Pluralization is performed by gobuffalo/flect, which is limited to English. This Go module is also used by these template functions:
inflect.Humanize
inflect.Singularize
inflect.Pluralize
If someone suggested adding this feature (and the associated template functions) today, I would vote no. Pluralization is complicated, based on language, and should be performed via Hugo’s i18n
(T
) template function.
Got my answer. Thanks Joe.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.