Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/capnfabs/paperesque.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/fitfigure.html')
-rw-r--r--layouts/shortcodes/fitfigure.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/shortcodes/fitfigure.html b/layouts/shortcodes/fitfigure.html
index 48e20b4..d5db3e3 100644
--- a/layouts/shortcodes/fitfigure.html
+++ b/layouts/shortcodes/fitfigure.html
@@ -2,8 +2,8 @@
{{- $original := .Page.Resources.GetMatch $path -}}
{{- if not $original -}}
{{- errorf "couldn't find resource for src: %s" $path -}}
-{{- else if and ((ne "jpeg" $original.MediaType.SubType) (ne "png" $original.MediaType.SubType)) -}}
- {{- errorf "src %s is a %s, expected image/jpg or image/png" $path $original.MediaType -}}
+{{- else if and (ne "jpeg" $original.MediaType.SubType) (ne "png" $original.MediaType.SubType) -}}
+ {{- errorf "src %s is a '%s', expected 'jpeg' or 'png'" $path $original.MediaType.SubType -}}
{{- else -}}
{{- /* Below is a copy paste of https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/figure.html from Hugo commit aba2647c152ffff927f42523b77ee6651630cd67, with the img tag modified to use srcsets */ -}}
{{- /* Note that it presently uses `markdownify` instead of $.Page.RenderString for consistency with Hugo's `figure` shortcode. */ -}}