fix: prevent failing build if tags is an empty string (#322)
parent
fdd4e19d0e
commit
3228f90eef
|
@ -58,7 +58,9 @@
|
|||
{{- end }}
|
||||
"url" : "{{ .Permalink }}",
|
||||
"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>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue