1
Fork 0

Allow forcing summary over github data

This commit is contained in:
Jake Howard 2017-11-10 14:38:53 +00:00
parent a7b9ea92bd
commit c240553d0b
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

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