mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Add IsHome
To determine if a page is the "Home Page" has inspired lots of creativity in the template department. This commit makes it simpler: IsHome will tell the truth.
This commit is contained in:
@@ -1233,6 +1233,7 @@ func (s *Site) RenderSectionLists() error {
|
||||
func (s *Site) newHomeNode() *Node {
|
||||
n := s.NewNode()
|
||||
n.Title = n.Site.Title
|
||||
n.IsHome = true
|
||||
s.setURLs(n, "/")
|
||||
n.Data["Pages"] = s.Pages
|
||||
return n
|
||||
|
Reference in New Issue
Block a user