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 }}