mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
Handle transient errors in config loading etc.
As in: Get the Kubernetes site to build with the new Hugo version. Updates #10947
This commit is contained in:
parent
5251f015bf
commit
05542130ba
7 changed files with 96 additions and 5 deletions
|
@ -87,7 +87,8 @@ var DeprecationFunc = func(item, alternative string, err bool) {}
|
|||
|
||||
const paramsDeprecationWarning = `.Language.Params is deprecated and will be removed in a future release. Use site.Params instead.
|
||||
|
||||
Also, for all but custom parameters, you need to use the built in Hugo variables, e.g. site.Title, site.LanguageCode; site.Language.Params.Title will not work.
|
||||
- For all but custom parameters, you need to use the built in Hugo variables, e.g. site.Title, site.LanguageCode; site.Language.Params.Title will not work.
|
||||
- All custom parameters needs to be placed below params, e.g. [languages.en.params] in TOML.
|
||||
|
||||
See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
|
||||
|
||||
|
@ -111,6 +112,10 @@ func (l *Language) loadLocation(tzStr string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (l *Language) String() string {
|
||||
return l.Lang
|
||||
}
|
||||
|
||||
// Languages is a sortable list of languages.
|
||||
type Languages []*Language
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue