mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-19 05:34:49 -04:00
Populated page Site metadata. Enables accessing Indexes from Page template.
This commit is contained in:
parent
42de9bd8bb
commit
780e2f311b
@ -271,6 +271,12 @@ func (s *Site) BuildSiteMeta() (err error) {
|
||||
return errors.New(fmt.Sprintf("Unable to build site metadata, no pages found in directory %s", s.c.ContentDir))
|
||||
}
|
||||
s.Info.LastChange = s.Pages[0].Date
|
||||
|
||||
// populate pages with site metadata
|
||||
for _, p := range s.Pages {
|
||||
p.Site = s.Info
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user