mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-23 05:30:41 +00:00
fix: prevent failing build if tags is an empty string (#187)
This commit is contained in:
parent
851c3d523e
commit
59a591c73b
@ -78,7 +78,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
Block a user