diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-11-13 11:07:32 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-11-13 12:41:16 +0100 |
commit | a7df536a52912f34d7d20c970c38590bf5e0c513 (patch) | |
tree | 2773e4660f458f32d19784cfb5f557f3b7ffb6e2 /hugolib/site.go | |
parent | 3477d9fcec39d17f99cbc891e337658e8660f5db (diff) | |
download | hugo-a7df536a52912f34d7d20c970c38590bf5e0c513.tar.gz hugo-a7df536a52912f34d7d20c970c38590bf5e0c513.zip |
Add site.Store and hugo.Store and Shortcode.Store
Closes #13021
Diffstat (limited to 'hugolib/site.go')
-rw-r--r-- | hugolib/site.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index c5a4956e2..c434ff2b4 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -95,6 +95,7 @@ type Site struct { language *langs.Language languagei int pageMap *pageMap + store *maps.Scratch // The owning container. h *HugoSites @@ -248,6 +249,7 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) { language: language, languagei: i, frontmatterHandler: frontmatterHandler, + store: maps.NewScratch(), } if i == 0 { @@ -614,6 +616,10 @@ func (s *Site) AllRegularPages() page.Pages { return s.h.RegularPages() } +func (s *Site) Store() *maps.Scratch { + return s.store +} + func (s *Site) CheckReady() { if s.state != siteStateReady { panic("this method cannot be called before the site is fully initialized") |