mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Misc doc, code refactoring to improve documentation
This commit is contained in:
@@ -266,7 +266,7 @@ func (m *pageMap) newResource(fim hugofs.FileMetaInfo, owner *pageState) (resour
|
||||
}
|
||||
|
||||
func (m *pageMap) createSiteTaxonomies() error {
|
||||
m.s.taxonomies = make(TaxonomyList)
|
||||
m.s.taxonomies = make(page.TaxonomyList)
|
||||
var walkErr error
|
||||
m.taxonomies.Walk(func(s string, v any) bool {
|
||||
n := v.(*contentNode)
|
||||
@@ -275,7 +275,7 @@ func (m *pageMap) createSiteTaxonomies() error {
|
||||
viewName := t.name
|
||||
|
||||
if t.termKey == "" {
|
||||
m.s.taxonomies[viewName.plural] = make(Taxonomy)
|
||||
m.s.taxonomies[viewName.plural] = make(page.Taxonomy)
|
||||
} else {
|
||||
taxonomy := m.s.taxonomies[viewName.plural]
|
||||
if taxonomy == nil {
|
||||
@@ -285,7 +285,7 @@ func (m *pageMap) createSiteTaxonomies() error {
|
||||
m.taxonomyEntries.WalkPrefix(s, func(ss string, v any) bool {
|
||||
b2 := v.(*contentNode)
|
||||
info := b2.viewInfo
|
||||
taxonomy.add(info.termKey, page.NewWeightedPage(info.weight, info.ref.p, n.p))
|
||||
taxonomy[info.termKey] = append(taxonomy[info.termKey], page.NewWeightedPage(info.weight, info.ref.p, n.p))
|
||||
|
||||
return false
|
||||
})
|
||||
|
Reference in New Issue
Block a user