From 5d857165fed4649c3aa639a1555a15b8b1c75bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 17 May 2023 09:59:57 +0200 Subject: Deprecate site.Language.Params and some other fixes Updates #10947 --- hugolib/hugo_sites_build.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hugolib/hugo_sites_build.go') diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 52ed34bf3..f86d425b3 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -22,6 +22,7 @@ import ( "strings" "time" + "github.com/gohugoio/hugo/langs" "github.com/gohugoio/hugo/publisher" "github.com/gohugoio/hugo/hugofs" @@ -40,6 +41,11 @@ import ( "github.com/gohugoio/hugo/helpers" ) +func init() { + // To avoid circular dependencies, we set this here. + langs.DeprecationFunc = helpers.Deprecated +} + // Build builds all sites. If filesystem events are provided, // this is considered to be a potential partial rebuild. func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error { -- cgit v1.2.3