mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -1606,8 +1606,12 @@ func (s *Site) nodeTypeFromSections(sections []string) NodeType {
|
||||
}
|
||||
|
||||
func (s *Site) findPagesByNodeType(n NodeType) Pages {
|
||||
return s.findPagesByNodeTypeIn(n, s.Pages)
|
||||
}
|
||||
|
||||
func (s *Site) findPagesByNodeTypeIn(n NodeType, inPages Pages) Pages {
|
||||
var pages Pages
|
||||
for _, p := range s.Pages {
|
||||
for _, p := range inPages {
|
||||
if p.NodeType == n {
|
||||
pages = append(pages, p)
|
||||
}
|
||||
@@ -1615,6 +1619,14 @@ func (s *Site) findPagesByNodeType(n NodeType) Pages {
|
||||
return pages
|
||||
}
|
||||
|
||||
func (s *Site) findAllPagesByNodeType(n NodeType) Pages {
|
||||
return s.findPagesByNodeTypeIn(n, s.rawAllPages)
|
||||
}
|
||||
|
||||
func (s *Site) findRawAllPagesByNodeType(n NodeType) Pages {
|
||||
return s.findPagesByNodeTypeIn(n, s.rawAllPages)
|
||||
}
|
||||
|
||||
// renderAliases renders shell pages that simply have a redirect in the header.
|
||||
func (s *Site) renderAliases() error {
|
||||
for _, p := range s.Pages {
|
||||
|
Reference in New Issue
Block a user