From 484d00e6054aaf356c5790c2d04ad082be76058b Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 10 Nov 2017 23:08:50 +0000 Subject: [PATCH] Complex summary --- layouts/partials/content.html | 2 +- layouts/partials/subtitle.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/subtitle.html diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 49ad0aa..eb9fe51 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -2,7 +2,7 @@
{{ end }}

{{ .Title }}

-
{{ .Params.subtitle }}
+
{{ partial "subtitle.html" . }}

{{ if .Params.date }} {{ .Date.Format "2006-01-02" }} diff --git a/layouts/partials/subtitle.html b/layouts/partials/subtitle.html new file mode 100644 index 0000000..c25c8a7 --- /dev/null +++ b/layouts/partials/subtitle.html @@ -0,0 +1,7 @@ +{{ if .Params.subtitle }} + {{ markdownify .Params.subtitle }} +{{ else if .Params.repo }} + {{ (getJSON "https://api.github.com/repos/" .Params.repo).description }} +{{ else if .Params.gist }} + {{ (getJSON "https://api.github.com/gists/" .Params.gist).description }} +{{ end }}