Skip to content

Commit

Permalink
Fix htmlEscaped chars in json output for lunr
Browse files Browse the repository at this point in the history
Both .Title and .Summary output modified with `plainify | htmlUnescape`
to remove escaped chars.
  • Loading branch information
acahir committed Jan 28, 2019
1 parent ae58164 commit 22c6ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}}
{{- range where .Site.Pages ".Params.skip" "ne" "true" -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "title" (cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify)) "categories" .Params.categories "keywords" .Params.keywords "content" .Summary) -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "title" (cond (eq .Site.Params.titlecase true) (.Title | title | markdownify | htmlUnescape) (.Title | markdownify | htmlUnescape)) "categories" .Params.categories "keywords" .Params.keywords "content" (.Summary | plainify | htmlUnescape )) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

0 comments on commit 22c6ee7

Please sign in to comment.