Skip to content

Commit

Permalink
layouts/_default/single.html: Improve Schema.org keywords
Browse files Browse the repository at this point in the history
Use delimit function over a union of Categories and Tags. This is
much easier to read, results in correct delimiting with no trailing
comma, and works even if one of the slices is nil.
  • Loading branch information
alanorth committed Jul 7, 2017
1 parent 6945b0d commit 2dd72d7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
}
{{- if or (.Params.categories) (.Params.tags) -}}
,
{{- /* delimit keywords by comma, even if one of .Params.categories or Params.tags is nil */ -}}
"keywords": "{{ delimit (union .Params.categories .Params.tags) ", " }}"
{{- end }}

Expand Down

0 comments on commit 2dd72d7

Please sign in to comment.