I am starting to work on a more permanent home for Letters here.

I need a better/consistent naming convention. I also think I want to figure out a way to list the name of the person I’m corresponding with.

Finally, I’m thinking about putting the post content, perhaps a full month at a time, behind a show/hide button on the page. As in, “Robb Knight, 2023 - January” listed, and it’s actually a toggle that opens up all of the contents of January’s Letters on the page.

Here’s the current state of my template as I start thinking through this.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{{define "main" }}
<div class="content list h-feed">
{{$pages := where .Site.Pages "Type" "post" }}
{{$letters := where $pages "Params.categories" "intersect" (slice "letters") }}
  {{ range ($letters.GroupByDate "2006-01").Reverse }}
    {{ $themonth := (time (printf "%s-%s" .Key "01")) }}
    <h1> 
      {{ if lt $themonth.Year "2023" }}
        About Letters
      {{ else }}
        {{ $themonth.Format "2006 - January" }}
      {{ end }}
    </h1>
    {{ range .Pages.Reverse }}
      {{ partial "li.html" . }}
    {{ end }}
    <hr>
 {{ end }}
</div>
{{ end }}

Bonus

Here’s a shot of my Panobook where I started writing ideas before I began fiddling with my actual templates/code.

You can see I was thinking about a collection of short codes before looking at my own site and realizing that my existing Archive page is actually a pretty good starting point and that my collapsible post content idea may be better as a partial.

Horizonal notebook with dot grid and an orange pen on a purple desk mat.