From c240553d0b38dd3e5d879c4b8b8dacd28651ec9f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 10 Nov 2017 14:38:53 +0000 Subject: [PATCH] Allow forcing summary over github data --- layouts/partials/summary.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html index eb67861..cb3e8c4 100644 --- a/layouts/partials/summary.html +++ b/layouts/partials/summary.html @@ -1,2 +1,16 @@ -{{ .Summary | plainify | chomp }}{{ if .Truncated }}…{{ end }} +{{ if eq .Section "posts" }} + {{ .Summary | plainify | chomp }}{{ if .Truncated }}…{{ end }} +{{ else if .Params.subtitle }} + {{ .Params.subtitle | markdownify }} +{{ else if .Params.repo }} + {{ if eq .Params.force_summary false }} + {{ (getJSON "https://api.github.com/repos/" .Params.repo).description }} + {{ end }} +{{ else if .Params.gist }} + {{ if eq .Params.force_summary false }} + {{ (getJSON "https://api.github.com/gists/" .Params.gist).description }} + {{ end }} +{{ else }} + {{ .Summary | plainify | chomp }}{{ if .Truncated }}…{{ end }} +{{ end }}