1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Stop "public" from showing up in bookmark tags

This commit is contained in:
Rohan Kumar 2022-03-16 16:42:29 -07:00
parent 12a6c098f7
commit 1bff1052de
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -21,8 +21,14 @@
<p>
Bookmarked on: <time class="dt-published published" itemprop="datePublished" datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}" title="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}">{{ dateFormat "2006-01-02 15:04" $timestamp }}</time>
<br>Tags: <span itemprop="keywords">
{{ printf "<span class=\"p-category\">%s</span>" (index $tags 1) | safeHTML }}
{{- range after 2 $tags -}}
{{- $start := 2 -}}
{{- $firstTag := (index $tags 1) -}}
{{- if (eq $firstTag "public") -}}
{{- $firstTag = (index $tags 2) -}}
{{- $start = 3 -}}
{{- end -}}
{{- printf "<span class=\"p-category\">%s</span>" $firstTag | safeHTML -}}
{{- range after $start $tags -}}
{{- $tag := . -}}
{{- if (ne $tag "public") -}}
{{- printf ", <span class=\"p-category\">%s</span>" $tag | safeHTML -}}