mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Add PluralizeListTitles option (default true) to allow disabling use of the inflect package
This commit is contained in:
committed by
spf13
parent
3eb480a62f
commit
35d04671d3
@@ -676,7 +676,11 @@ func (s *Site) RenderListsOfTaxonomyTerms() (err error) {
|
||||
func (s *Site) RenderSectionLists() error {
|
||||
for section, data := range s.Sections {
|
||||
n := s.NewNode()
|
||||
n.Title = strings.Title(inflect.Pluralize(section))
|
||||
if viper.GetBool("PluralizeListTitles") {
|
||||
n.Title = strings.Title(inflect.Pluralize(section))
|
||||
} else {
|
||||
n.Title = strings.Title(section)
|
||||
}
|
||||
s.setUrls(n, section)
|
||||
n.Date = data[0].Page.Date
|
||||
n.Data["Pages"] = data.Pages()
|
||||
|
Reference in New Issue
Block a user