layouts/blog/summary.html (19 lines of code) (raw):

<article class="blog doc"> <header> <a href="{{ .RelPermalink }}"><h1>{{ .Title }}</h1></a> {{ $headers := dict }} {{ with os.Getenv "GITHUB_TOKEN" }} {{ $headers = dict "Authorization" (printf "Bearer %s" .) }} {{ else }} {{ $headers = dict "Authorization" (printf "Basic %s" (printf "%s:%s" $.Site.Params.GitHubUsername $.Site.Params.GitHubToken | base64Encode)) }} {{ end }} <time itemprop="published" datetime="{{ dateFormat "2006-01-02" .PublishDate }}" title="{{ dateFormat "Monday, January 2, 2006" .PublishDate }}">{{ dateFormat "January 2, 2006" .PublishDate }}</time>, by {{ range $idx, $author := .Params.authors }}{{ if gt $idx 0 }}, {{ end }}<span rel="author">{{ (getJSON "https://api.github.com/users/" $author $headers).name }}</span>{{ end }} </header> <p>{{ .Summary }}</p> <p><a class="continue" href="{{ .RelPermalink }}">Continue reading &#10095;</a></p> <p> {{ if .Params.categories }} {{ range .Params.categories }}<a class="category" href="{{ "/categories/" | relURL }}{{ . | urlize }}/">{{ upper . }}</a>{{ end }} {{end}} </p> </article>