36 lines
1.6 KiB
HTML
36 lines
1.6 KiB
HTML
{{- $showdate := default (default true $.Site.Params.showMetaDates) .Params.showmetadates }}
|
|
{{- $showlink := default (default true $.Site.Params.showMetaLinks) .Params.showmetalinks }}
|
|
{{- if or $showdate $showlink }}
|
|
<div class="post-meta">
|
|
{{- if $showdate }}
|
|
<span>Date:</span>
|
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
|
{{- .Date.Format (default "01-02-2006" .Site.Params.dateFmt) -}}
|
|
</time>;
|
|
{{- if ne .Date .Lastmod }}
|
|
<span>Last modified:</span> [
|
|
<time datetime="{{- .Lastmod.Format "2006-01-02T15:04:05Z07:00" -}}">
|
|
{{ .Lastmod.Format (default "01-02-2006" .Site.Params.dateFmt) }}
|
|
</time>;
|
|
{{- end }} <!-- if ne .Date .Lastmod -->
|
|
{{- end }} <!-- if $showdate -->
|
|
|
|
{{- if $showlink }}
|
|
{{- $fallback := slice (dict "Identifier" "Categories") (dict "Identifier" "Series") (dict "Identifier" "Tags") }}
|
|
{{- range default $fallback .Site.Menus.meta }}
|
|
{{- $taxo := $.Param .Identifier }}
|
|
{{- if $taxo }}
|
|
{{ $name := default .Identifier .Name }}
|
|
{{ $link := default .Identifier .URL }}
|
|
<span{{ if .Title }} title="{{ .Title }}"{{ end }}>{{ $name }}:</span> [
|
|
{{- range $taxo }}
|
|
{{- $perma := lower (path.Join $link (urlize .)) }}
|
|
<a href="{{ $perma | relURL }}">{{ . }}</a>
|
|
{{- end }} <!-- range $taxo -->
|
|
]
|
|
{{- end }} <!-- if $taxo -->
|
|
{{- end }} <!-- range default $fallback .Site.Menus.meta -->
|
|
{{- end }} <!-- - if $showlink -->
|
|
</div>
|
|
{{- end }} <!-- if or $showdate $showlink -->
|