mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Allow getJSON errors to be ignored
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
This commit is contained in:
@@ -431,7 +431,7 @@ func (pm *pageMeta) setMetadata(parentBucket *pagesMapBucket, p *pageState, fron
|
||||
// more easily tested without the Page, but the coupling is strong.
|
||||
err := pm.s.frontmatterHandler.HandleDates(descriptor)
|
||||
if err != nil {
|
||||
p.s.Log.ERROR.Printf("Failed to handle dates for page %q: %s", p.pathOrTitle(), err)
|
||||
p.s.Log.Errorf("Failed to handle dates for page %q: %s", p.pathOrTitle(), err)
|
||||
}
|
||||
|
||||
pm.buildConfig, err = pagemeta.DecodeBuildConfig(frontmatter["_build"])
|
||||
@@ -486,7 +486,7 @@ func (pm *pageMeta) setMetadata(parentBucket *pagesMapBucket, p *pageState, fron
|
||||
// We added support for page relative URLs in Hugo 0.55 and
|
||||
// this may get its language path added twice.
|
||||
// TODO(bep) eventually remove this.
|
||||
p.s.Log.WARN.Printf(`Front matter in %q with the url %q with no leading / has what looks like the language prefix added. In Hugo 0.55 we added support for page relative URLs in front matter, no language prefix needed. Check the URL and consider to either add a leading / or remove the language prefix.`, p.pathOrTitle(), url)
|
||||
p.s.Log.Warnf(`Front matter in %q with the url %q with no leading / has what looks like the language prefix added. In Hugo 0.55 we added support for page relative URLs in front matter, no language prefix needed. Check the URL and consider to either add a leading / or remove the language prefix.`, p.pathOrTitle(), url)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ func (pm *pageMeta) setMetadata(parentBucket *pagesMapBucket, p *pageState, fron
|
||||
outFormats, err := p.s.outputFormatsConfig.GetByNames(o...)
|
||||
|
||||
if err != nil {
|
||||
p.s.Log.ERROR.Printf("Failed to resolve output formats: %s", err)
|
||||
p.s.Log.Errorf("Failed to resolve output formats: %s", err)
|
||||
} else {
|
||||
pm.configuredOutputFormats = outFormats
|
||||
pm.params[loki] = outFormats
|
||||
@@ -634,7 +634,7 @@ func (pm *pageMeta) setMetadata(parentBucket *pagesMapBucket, p *pageState, fron
|
||||
|
||||
if draft != nil && published != nil {
|
||||
pm.draft = *draft
|
||||
p.m.s.Log.WARN.Printf("page %q has both draft and published settings in its frontmatter. Using draft.", p.File().Filename())
|
||||
p.m.s.Log.Warnf("page %q has both draft and published settings in its frontmatter. Using draft.", p.File().Filename())
|
||||
} else if draft != nil {
|
||||
pm.draft = *draft
|
||||
} else if published != nil {
|
||||
|
Reference in New Issue
Block a user