hugo-theme-hoogi/layouts/partials/article-header.html

22 lines
666 B
HTML
Raw Normal View History

<header>
<h1>
{{ if eq (.Scratch.Get "scope") "single" }}
{{.Title}}
{{ else }}
<a href="{{.Permalink}}">{{.Title}}</a>
{{ end }}
</h1>
<p>
{{ T "written_on" }} <time>{{ .Date.Format "Jan 2, 2006" }}</time> {{ if .Params.Author }}{{ T "written_by" }} {{ .Params.Author }}{{ end }}
</p>
<ul class="categories">
{{ if .Params.categories }}
{{ T "category_in" }}
{{ range .Params.categories }}
<li><a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}">{{ . | humanize }}</a></li>
{{ end }}
{{ end }}
</ul>
</header>