Files
tsuki/layouts/_partials/meta.html
T
tiennm99 6e17ee62b9 fix: address v0.1.0 audit findings and security notes
Fixes issues flagged in audit: improve footer spacing, meta tag refinement,
code-copy utility robustness, and add security notes to data schemas.
2026-05-09 09:32:17 +07:00

33 lines
1.2 KiB
HTML

<div class="post-meta">
{{- with .Date }}
<time datetime="{{ .Format "2006-01-02" }}" class="post-date">
{{ . | time.Format ":date_long" }}
</time>
{{- end }}
{{- if and .Lastmod (gt (.Lastmod.Sub .Date).Hours 24.0) }}
<span class="post-lastmod">
{{ i18n "updatedOn" }} <time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod | time.Format ":date_long" }}</time>
</span>
{{- end }}
{{- if gt .ReadingTime 0 }}
<span class="reading-time">
{{ i18n "readingTime" (dict "Count" .ReadingTime) | default (printf "%d min" .ReadingTime) }}
</span>
{{- end }}
{{- if and (site.Params.showWordCount | default false) (gt .WordCount 0) }}
<span class="word-count">
{{ i18n "wordCount" (dict "Count" .WordCount) | default (printf "%d words" .WordCount) }}
</span>
{{- end }}
{{/* Categories are deliberately not surfaced here; the `categories` taxonomy is routing-only. */}}
{{/* Tag plural is part of the theme contract — see docs/config.md. */}}
{{- with .GetTerms "tags" }}
<span class="post-tags">
{{- range $i, $term := . -}}
{{- if $i }}, {{ end -}}
<a href="{{ $term.RelPermalink }}">#{{ $term.LinkTitle }}</a>
{{- end -}}
</span>
{{- end }}
</div>