diff options
| author | aethrvmn <me@aethrvmn.gr> | 2025-09-27 11:23:42 +0000 |
|---|---|---|
| committer | aethrvmn <me@aethrvmn.gr> | 2025-09-27 11:23:42 +0000 |
| commit | 4f83f002ad78ae3612df232bdb355859a25a6052 (patch) | |
| tree | b03400ce3526a3335ae9a0e4d6f490c73d23bc75 /layouts/partials/docs | |
| parent | blog title and taxonomy fix (diff) | |
fix tag display in blog
Diffstat (limited to 'layouts/partials/docs')
| -rw-r--r-- | layouts/partials/docs/date.html | 6 | ||||
| -rw-r--r-- | layouts/partials/docs/post-meta.html | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/docs/date.html b/layouts/partials/docs/date.html new file mode 100644 index 0000000..d33cdbe --- /dev/null +++ b/layouts/partials/docs/date.html @@ -0,0 +1,6 @@ +<!-- + Returns formatted date. + Usage: partial "docs/date" (dict "Date" .Date "Format" .Site.Params.BookDateFormat) +--> +{{- $format := default "January 2, 2006" .Format -}} +{{- return (time.Format $format .Date | lower ) -}} diff --git a/layouts/partials/docs/post-meta.html b/layouts/partials/docs/post-meta.html new file mode 100644 index 0000000..f111ce8 --- /dev/null +++ b/layouts/partials/docs/post-meta.html @@ -0,0 +1,16 @@ +{{ with .Date }} + <div class="flex align-center text-small book-post-date"> + <img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon " alt="" /> + <span>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</span> + </div> +{{ end }} + +{{ range $taxonomy, $_ := .Site.Taxonomies }} + {{ with $terms := $.GetTerms $taxonomy }} + <div class="text-small"> + {{ range $n, $term := $terms }}{{ if $n }}, {{ end }} + <a href="{{ $term.RelPermalink }}">{{ $term.Title | lower }}</a> + {{- end }} + </div> + {{ end }} +{{ end }} |
