Collecting my attempts to improve at tech, art, and life

Hugo

Does any of this enlighten, entertain, or otherwise please you? Please consider a Tip. Every little bit helps!

I last updated this page

Go-powered static site generator. Very fast, very capable, very annoying templating language for my tastes. Hugo’s been my default SSG for around a decade, so the templating language couldn’t be that annoying.

The world’s fastest framework for building websites

Grouping list pages by year

I don’t need it this split second, but I’ll probably try it again at some point.

_default/list.html
    {{ define "main" -}}
    <h1>{{ .Title }}</h1>
    {{ .Content }}
    <ul>
        {{ range .Pages.GroupByDate "2006" -}}
            <h3>{{ .Key }}</h3>
            {{ range .Pages -}}
                {{ .Render "list-item"}}
            {{- end }}
        {{- end }}
    </ul>
{{ end }}