🐛 Emojify JSON output for search results

pull/110/head
James Panther 2022-02-08 09:00:35 +11:00
parent 027cdf071d
commit 7d6be8a999
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 10 additions and 2 deletions

View File

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Main content area not growing to fill screen vertically
- Search results not cleared when search is dismissed ([#109](https://github.com/jpanther/congo/pull/109))
- Emoji strings not displaying in search results
## [2.0.3] - 2022-02-07

View File

@ -1,6 +1,13 @@
{{- $index := slice -}}
{{- range .Site.RegularPages -}}
{{ $section := .Site.GetPage "section" .Section }}
{{- $index = $index | append (dict "date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) "title" .Title "section" $section.Title "summary" .Summary "content" (.Plain | safeJS) "permalink" .RelPermalink) -}}
{{- $section := .Site.GetPage "section" .Section -}}
{{- $index = $index | append (dict
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
"summary" (.Summary | emojify | safeJS)
"content" (.Plain | emojify | safeJS)
"permalink" .RelPermalink
) -}}
{{- end -}}
{{- $index | jsonify -}}