Deprecate site.Language.Params and some other fixes

Updates #10947
This commit is contained in:
Bjørn Erik Pedersen
2023-05-17 09:59:57 +02:00
parent 0106cf1a6d
commit 5d857165fe
5 changed files with 121 additions and 5 deletions

View File

@@ -132,6 +132,8 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
return nil, err
}
langs.SetParams(language, conf.Params)
s := &Site{
conf: conf,
language: language,
@@ -411,6 +413,10 @@ func (s *Site) Author() map[string]any {
return s.conf.Author
}
func (s *Site) Authors() page.AuthorList {
return page.AuthorList{}
}
func (s *Site) Social() map[string]string {
return s.conf.Social
}
@@ -434,6 +440,14 @@ func (s *Site) Data() map[string]any {
return s.s.h.Data()
}
func (s *Site) BuildDrafts() bool {
return s.conf.BuildDrafts
}
func (s *Site) IsMultiLingual() bool {
return s.h.isMultiLingual()
}
func (s *Site) LanguagePrefix() string {
conf := s.s.Conf
if !conf.IsMultiLingual() {