aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/shortcode.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-10-21 11:17:48 +0200
committerBjørn Erik Pedersen <[email protected]>2020-10-22 09:09:29 +0200
commitfdfa4a5fe62232f65f1dd8d6fe0c500374228788 (patch)
treeb804e91506a7f3c58690c6fd774b28f95184d5dc /hugolib/shortcode.go
parent8cbe2bbfad6aa4de267921e24e166d4addf47040 (diff)
downloadhugo-fdfa4a5fe62232f65f1dd8d6fe0c500374228788.tar.gz
hugo-fdfa4a5fe62232f65f1dd8d6fe0c500374228788.zip
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
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r--hugolib/shortcode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index 366c9971c..619047e38 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -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
}