From 98409f609e88dd422ee66260cba2a442aca2e5d5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 17 Sep 2017 11:09:45 +0100 Subject: [PATCH] Add tags to meta JSON files --- layouts/_default/list.json | 3 ++- layouts/_default/single.json | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.json b/layouts/_default/list.json index 1388ca8..0cdf338 100644 --- a/layouts/_default/list.json +++ b/layouts/_default/list.json @@ -8,7 +8,8 @@ "url": "{{ .Permalink }}", "link": "{{ .RelPermalink }}", "link_title": "{{ .LinkTitle }}" - "parent": "{{ if .Parent }}{{ lower .Parent.Title }}{{ end }}" + "parent": "{{ if .Parent }}{{ lower .Parent.Title }}{{ end }}", + "tags": {{ jsonify .Params.tags }} } {{ end }} } diff --git a/layouts/_default/single.json b/layouts/_default/single.json index d5c34d4..e34c37a 100644 --- a/layouts/_default/single.json +++ b/layouts/_default/single.json @@ -4,8 +4,9 @@ "date_published": "{{ .Date }}", "image": "{{ absURL .Params.image }}", "url": "{{ .Permalink }}", - "content_html": {{ .Content | jsonify }}, - "content_text": {{ .RawContent | jsonify }}, - "summary": {{ .Summary | jsonify }}, - "banner_image": "{{ absURL .Params.image }}" + "content_html": {{ jsonify .Content }}, + "content_text": {{ jsonify .RawContent }}, + "summary": {{ jsonify .Summary }}, + "banner_image": "{{ absURL .Params.image }}", + "tags": {{ jsonify .Params.tags }} }