From 7d6be8a999ab279c05a9b4090175e3735ecab702 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 8 Feb 2022 09:00:35 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Emojify=20JSON=20output=20for=20?= =?UTF-8?q?search=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + layouts/_default/index.json | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f5af5d5..9a48b25b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 789b95c5..b7bd589a 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -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 -}}