Add PluralizeListTitles option (default true) to allow disabling use of the inflect package

This commit is contained in:
Kristoffer Grönlund
2014-06-24 23:44:16 +02:00
committed by spf13
parent 3eb480a62f
commit 35d04671d3
2 changed files with 12 additions and 2 deletions

View File

@@ -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()