update draft

This commit is contained in:
John Bowdre 2024-06-01 21:16:25 -05:00
parent dc8dadd79f
commit f90ee9696e

View file

@ -140,18 +140,20 @@ While I'm at it, I'd like for the posts themselves to be listed in alphabetical
```jinja-html ```jinja-html
# torchlight! {"lineNumbers":true} # torchlight! {"lineNumbers":true}
{{- if eq .Kind "taxonomy" }} <!-- [tl! reindex(15) ] --> {{- if eq .Kind "taxonomy" }} <!-- [tl! reindex(15) ] -->
{{- if eq .Title "Tags" }} {{- if eq .Title "Tags" }} <!-- [tl! **:1 ] -->
{{/* list of all tags */}}
<div class="tagsArchive"> <div class="tagsArchive">
{{- range $key, $value := .Site.Taxonomies }} {{- range $key, $value := .Site.Taxonomies }}
{{- $slicedTags := ($value.ByCount) }} {{- $slicedTags := ($value.ByCount) }}
{{- range $slicedTags }} {{- range $slicedTags }}
{{- if eq $key "tags"}} {{- if eq $key "tags"}}
<div><a href='/{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' title="{{ .Name }}">{{ .Name }}</a><sup>{{ .Count }}</sup></div> <div><a href='/{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' title="{{ .Name }}">{{ .Name }}</a><sup>{{ .Count }} </sup></div> <!-- [tl! ** ] -->
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
</div> </div>
{{- else }} {{- else }}
{{/* list of all categories */}} <!-- [tl! ** ] -->
{{- range .Pages.ByDate.Reverse }} {{- range .Pages.ByDate.Reverse }}
{{- $postDate := .Date.Format "2006-01-02" }} {{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }} {{- $updateDate := .Lastmod.Format "2006-01-02" }}
@ -159,7 +161,7 @@ While I'm at it, I'd like for the posts themselves to be listed in alphabetical
<header class="post__header"> <header class="post__header">
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1> <h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<p class="post__meta"> <p class="post__meta">
<span class="date">["{{- $postDate }}"{{- if ne $postDate $updateDate }}, "{{ $updateDate }}"{{ end }}]</span> <span class="date">["{{ with $updateDate }}{{ . }}{{ else }}{{ .$postDate }}{{ end }}"]</span>
</p> </p>
</header> </header>
<section class="post__summary"> <section class="post__summary">
@ -170,6 +172,7 @@ While I'm at it, I'd like for the posts themselves to be listed in alphabetical
{{ end }} {{ end }}
{{- end }} {{- end }}
{{- else }} {{- else }}
{{/* regular posts archive */}}
{{- range (.Paginate $pages).Pages }} {{- range (.Paginate $pages).Pages }}
{{- $postDate := .Date.Format "2006-01-02" }} {{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }} {{- $updateDate := .Lastmod.Format "2006-01-02" }}
@ -181,7 +184,7 @@ While I'm at it, I'd like for the posts themselves to be listed in alphabetical
</p> </p>
</header> </header>
<section class="post__summary"> <section class="post__summary">
{{ .Summary }} {{if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}
</section> </section>
<hr> <hr>
</article> </article>