aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2024-02-02 13:41:30 +0100
committerGuido Günther <agx@sigxcpu.org>2024-02-02 13:43:10 +0100
commit01f4b4d369a899f893b656ef8bf6ad6d9b64fc2a (patch)
tree1163e1eaf9c52fc10e91bbd2958f0418533c16b8
parent0ad3b28ece33abfc652410cdc5b016627aeef408 (diff)
shortcodes: Fix json+ld when there are no images
-rw-r--r--layouts/shortcodes/json-ld-blog.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/shortcodes/json-ld-blog.html b/layouts/shortcodes/json-ld-blog.html
index ef039dd..a430cb0 100644
--- a/layouts/shortcodes/json-ld-blog.html
+++ b/layouts/shortcodes/json-ld-blog.html
@@ -14,10 +14,11 @@
"name": {{- .LinkTitle }}
}
{{- end }}
- ],
- {{- end }}
+ ]
+ {{- end -}}
+ {{- if .Resources.ByType "image" -}},{{ end }}
{{- with .Resources.ByType "image" }}
- "image":[
+ "image": [
{{- range $index, $element := . -}}
{{- if ne $index 0 }},{{ end }}
{{ .Permalink -}}