🐛 Fixed Site Params parsing
This commit is contained in:
parent
c7158f47dd
commit
e74c0a0b66
|
@ -56,7 +56,7 @@ func (repo *fileSystemSiteRepository) Get(ctx context.Context, lang language.Tag
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
data := new(Site)
|
||||
data := NewSite()
|
||||
if data.Content, err = frontmatter.Parse(f, data, FrontMatterFormats...); err != nil {
|
||||
return nil, fmt.Errorf("cannot parse site content as FrontMatter: %w", err)
|
||||
}
|
||||
|
@ -93,3 +93,9 @@ func (tz TimeZone) MarshalYAML() (any, error) {
|
|||
|
||||
return tz.Location.String(), nil
|
||||
}
|
||||
|
||||
func NewSite() *Site {
|
||||
return &Site{
|
||||
Params: make(map[string]any),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue