diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-06-15 16:33:09 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-06-15 22:23:02 +0200 |
commit | 522ba1cd98ac67482061448c3a7528e68a720f0d (patch) | |
tree | 527560bfa89b66683c1118d132c8270b42812777 /hugolib/content_map_page.go | |
parent | 889dc47ceba9cf5cbd6e61a9222a5e54cd562332 (diff) | |
download | hugo-522ba1cd98ac67482061448c3a7528e68a720f0d.tar.gz hugo-522ba1cd98ac67482061448c3a7528e68a720f0d.zip |
Fix order of GetTerms
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms).
Fixes #7213
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r-- | hugolib/content_map_page.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index 7516a7029..8c7ecc341 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -579,7 +579,6 @@ func (m *pageMap) attachPageToViews(s string, b *contentNode) { if vals == nil { continue } - w := getParamToLower(b.p, viewName.plural+"_weight") weight, err := cast.ToIntE(w) if err != nil { @@ -587,11 +586,12 @@ func (m *pageMap) attachPageToViews(s string, b *contentNode) { // weight will equal zero, so let the flow continue } - for _, v := range vals { + for i, v := range vals { termKey := m.s.getTaxonomyKey(v) bv := &contentNode{ viewInfo: &contentBundleViewInfo{ + ordinal: i, name: viewName, termKey: termKey, termOrigin: v, |