From 682bd67df3520ff0ec8905d7c281b399561d1dcd Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 9 Nov 2017 13:48:28 +0000 Subject: [PATCH] Use custom summary renderer --- Makefile | 2 +- config.yml | 4 ++-- layouts/partials/list_item.html | 2 +- layouts/partials/summary.html | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 layouts/partials/summary.html diff --git a/Makefile b/Makefile index 5be6b99..6cef7ba 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ build: install cp static/keybase.txt public/keybase.txt server: build - hugo server --noHTTPCache + hugo server --noHTTPCache --disableFastRender clean: diff --git a/config.yml b/config.yml index 7908c28..447fd26 100644 --- a/config.yml +++ b/config.yml @@ -5,11 +5,11 @@ title: TheOrangeOne params: author: TheOrangeOne author_name: Jake Howard - summary_length: 125 - summary_length_long: 200 nav_items: 5 index_items: 6 +summaryLength: 40 + outputFormats: markdown: name: "txt" diff --git a/layouts/partials/list_item.html b/layouts/partials/list_item.html index f4788ea..e1c3b76 100644 --- a/layouts/partials/list_item.html +++ b/layouts/partials/list_item.html @@ -10,6 +10,6 @@
{{ .Title }}
-

{{ .Summary }}

+

{{ partial "summary.html" . }}

diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html new file mode 100644 index 0000000..9b490ce --- /dev/null +++ b/layouts/partials/summary.html @@ -0,0 +1 @@ +{{ .Summary }}{{ if .Truncated }}…{{ end }}