mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +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:
@@ -324,7 +324,7 @@ func renderShortcode(
|
||||
var found, more bool
|
||||
tmpl, found, more = s.Tmpl().LookupVariant(sc.name, tplVariants)
|
||||
if !found {
|
||||
s.Log.ERROR.Printf("Unable to locate template for shortcode %q in page %q", sc.name, p.File().Path())
|
||||
s.Log.Errorf("Unable to locate template for shortcode %q in page %q", sc.name, p.File().Path())
|
||||
return "", false, nil
|
||||
}
|
||||
hasVariants = hasVariants || more
|
||||
@@ -349,7 +349,7 @@ func renderShortcode(
|
||||
hasVariants = hasVariants || more
|
||||
inner += s
|
||||
default:
|
||||
s.Log.ERROR.Printf("Illegal state on shortcode rendering of %q in page %q. Illegal type in inner data: %s ",
|
||||
s.Log.Errorf("Illegal state on shortcode rendering of %q in page %q. Illegal type in inner data: %s ",
|
||||
sc.name, p.File().Path(), reflect.TypeOf(innerData))
|
||||
return "", false, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user