accessible.tips/themes/hugo-xmin/layouts/partials/page_meta.html

34 lines
1.2 KiB
HTML
Raw Normal View History

<div class="article-meta">
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
{{ with .Params.author }}
<h3 class="author">By:
{{ if (reflect.IsSlice .) }}
{{ delimit . ", " }}
{{ else }}
{{ . }}
{{ end }}
</h3>
{{ end }}
{{ if (gt .Date 0) }}<h4 class="date">Published: {{ .Date.Format "2006/01/02" }}</h4>{{ end }}
{{ if (gt .Lastmod 0) }}<h4 class="date">Last Modified: {{ .Lastmod.Format "2006/01/02" }}</h4>{{ end }}
<p class="terms">
{{ range $i := (slice "categories" "tags") }}
{{ with ($.Param $i) }}
{{ $i | title }}: {{ range $k := . }}<a href="{{ relURL (print "/" $i "/" $k | urlize) }}">{{$k}}</a> {{ end }}
{{ end }}
{{ end }}
</p>
<p class="terms">
{{ partial "related.html" . }}
</p>
<p>
{{ if (gt .ReadingTime 0) }}<small>Reading Time: {{ .ReadingTime }} minutes</small>{{ end }}
&nbsp;|&nbsp;
{{ if (gt .WordCount 0) }}<small>Word Count: {{ .WordCount }} words</small>{{ end }}
</p>
</div>
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}