Disable pluralization of sections

So I have a content directory setup like this:

├───Motion Graphics

and you can probably recognize where I got this code:


    {{ $currentPage := . }}

    {{ range .Site.Menus.main }}

    <a class="nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>

    {{ end }}


However what it actually produces is

<a class="nav-item" href="/motion-graphics/" title="Motion Graphics">Motion Graphics</a>

<a class="nav-item" href="/vfx/" title="VFxes">VFxes</a>

This indicates VFX is being incorrectly pluralized. Are there instructions for how to disable this pluralization while keeping all the other benefits? I know I can rename the section manually but I’d rather just disable the automatic pluralization if it’s possible.

Try this from config docs: Configure Hugo | Hugo

pluralizeListTitles (true)
Pluralize titles in lists.

1 Like

That’ll do it. Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.