page__meta.go (hugo-0.80.0) | : | page__meta.go (hugo-0.81.0) | ||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
import ( | import ( | |||
"fmt" | "fmt" | |||
"path" | "path" | |||
"path/filepath" | "path/filepath" | |||
"regexp" | "regexp" | |||
"strings" | "strings" | |||
"sync" | "sync" | |||
"time" | "time" | |||
"github.com/gobuffalo/flect" | ||||
"github.com/gohugoio/hugo/markup/converter" | "github.com/gohugoio/hugo/markup/converter" | |||
"github.com/gohugoio/hugo/hugofs/files" | "github.com/gohugoio/hugo/hugofs/files" | |||
"github.com/gohugoio/hugo/common/hugo" | "github.com/gohugoio/hugo/common/hugo" | |||
"github.com/gohugoio/hugo/related" | "github.com/gohugoio/hugo/related" | |||
"github.com/gohugoio/hugo/source" | "github.com/gohugoio/hugo/source" | |||
"github.com/markbates/inflect" | ||||
"github.com/pkg/errors" | "github.com/pkg/errors" | |||
"github.com/gohugoio/hugo/common/maps" | "github.com/gohugoio/hugo/common/maps" | |||
"github.com/gohugoio/hugo/config" | "github.com/gohugoio/hugo/config" | |||
"github.com/gohugoio/hugo/helpers" | "github.com/gohugoio/hugo/helpers" | |||
"github.com/gohugoio/hugo/output" | "github.com/gohugoio/hugo/output" | |||
"github.com/gohugoio/hugo/resources/page" | "github.com/gohugoio/hugo/resources/page" | |||
"github.com/gohugoio/hugo/resources/page/pagemeta" | "github.com/gohugoio/hugo/resources/page/pagemeta" | |||
"github.com/gohugoio/hugo/resources/resource" | "github.com/gohugoio/hugo/resources/resource" | |||
skipping to change at line 720 | skipping to change at line 720 | |||
case page.KindSection: | case page.KindSection: | |||
var sectionName string | var sectionName string | |||
if n != nil { | if n != nil { | |||
sectionName = n.rootSection() | sectionName = n.rootSection() | |||
} else { | } else { | |||
sectionName = p.sections[0] | sectionName = p.sections[0] | |||
} | } | |||
sectionName = helpers.FirstUpper(sectionName) | sectionName = helpers.FirstUpper(sectionName) | |||
if p.s.Cfg.GetBool("pluralizeListTitles") { | if p.s.Cfg.GetBool("pluralizeListTitles") { | |||
p.title = inflect.Pluralize(sectionName) | p.title = flect.Pluralize(sectionName) | |||
} else { | } else { | |||
p.title = sectionName | p.title = sectionName | |||
} | } | |||
case page.KindTerm: | case page.KindTerm: | |||
// TODO(bep) improve | // TODO(bep) improve | |||
key := p.sections[len(p.sections)-1] | key := p.sections[len(p.sections)-1] | |||
p.title = strings.Replace(p.s.titleFunc(key), "-", " ", - 1) | p.title = strings.Replace(p.s.titleFunc(key), "-", " ", - 1) | |||
case page.KindTaxonomy: | case page.KindTaxonomy: | |||
p.title = p.s.titleFunc(p.sections[0]) | p.title = p.s.titleFunc(p.sections[0]) | |||
case kind404: | case kind404: | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |