hugo-theme-anubis2/layouts/partials/post-info.html

34 lines
1.3 KiB
HTML
Raw Normal View History

2020-05-24 21:55:32 +02:00
{{ $dateFormat := "2006-01-02" }}
{{ if .Site.Params.dateFormat }}
{{ $dateFormat = .Site.Params.dateFormat }}
{{ end }}
2020-06-06 21:05:21 +02:00
<div class="post-info">
{{ if .Params.date }}
<div class="post-date dt-published">{{ .Params.date.Format $dateFormat }}</div>
{{ end }}
<a class="post-hidden-url u-url" href="{{ .Permalink }}">{{ .Permalink }}</a>
<a href="{{ .Site.BaseURL }}" class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a>
2020-06-06 21:05:21 +02:00
<div class="post-taxonomies">
{{ if .Params.categories }}
2020-06-06 21:05:21 +02:00
<ul class="post-categories">
2021-12-31 23:03:40 +01:00
{{ range $cat_name := .Params.categories }}
{{ $cat := ($.Site.GetPage (printf "/categories/%s" $cat_name)) }}
2022-01-03 10:22:43 +01:00
<li><a href="{{ $cat.Permalink }}">{{ $cat.Title | default $cat_name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if .Params.tags }}
2020-06-06 21:05:21 +02:00
<ul class="post-tags">
2021-12-31 23:03:40 +01:00
{{ range $tag_name := .Params.tags }}
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name)) }}
<li><a href="{{ $tag.Permalink }}">#{{ $tag.Title | default $tag_name }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
</div>