fix: prevent failing build if tags is an empty string (#322)
parent
fdd4e19d0e
commit
3228f90eef
|
@ -58,7 +58,9 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
"url" : "{{ .Permalink }}",
|
"url" : "{{ .Permalink }}",
|
||||||
"wordCount" : "{{ .WordCount }}",
|
"wordCount" : "{{ .WordCount }}",
|
||||||
"genre" : [ {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}"{{ $tag }}" {{ end }}]
|
{{- with $tags := .Params.tags }}
|
||||||
|
"genre" : [ {{ range $i, $tag := $tags }}{{ if $i }}, {{ end }}"{{ $tag }}" {{ end }}]
|
||||||
|
{{- end }}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue