HUGO

{{ .CurrentSection.Title }} plural/single

Hello all. Simple question:

{{ .CurrentSection.Title }} appears to pluralise the section title.

content\essay is rendering as essays.

I don’t want a tag that says the entry is contained in the essays folder. I want one that says it’s an essay.

Can anyone advise how to get the actual section name, not a pluralised form of it?

Thanks

@richardjlyon, Try {{ strings.TrimSuffix "s" .CurrentSection.Title }}. The function is documented under functions

Thanks Weru - that’s very helpful

Best wishes,
Richard

1 Like