(wait, how'd I get the blog to do that?)

I specifically use a static blogging software written in a language I don’t know so I won’t be too tempted to spend all my time screwing with it instead of just getting things down. The typography needs some serious work. I have tweaked some things, though. So before I forget what everything in the hugo.toml does…

Including HTML

This was for embedding p5.js scripts and X3D files. I use the default markup renderer.


  # Allows HTML in Markdown
  unsafe = true # default is false

remapping “posts” to “excuses” on the QT

From about a year ago. (end of page.)


(note that pageRef gets used for internal pages now. url is only for external pages.)

  posts = "excuses/:title"

    identifier = "posts"
    name = "posts"
    title = "posts"
    pageRef = "/excuses/"
    weight = 10

Code block formatting

From July 2023

theme = "etch"
enableInlineShortcodes = true
    lineNos = false
    codeFences = true
    noClasses = false

Having a “storage” folder to put scrap files in

Didn’t document at the time but here ae some references:

  excludeFiles = '/posts/**/storage'
  source = 'content'
  target = 'content'

Using anchor tags

I forget. every. time.

Adding the below to the toml means custom block attributes are also now possible.

  # Allows custom attributes 
  block = true # default is false
my fancy paragraph that I will want to link to again

The above will slip that id attribute into the <p> or other block tag, which then can be used as an anchor.

Adding a Series

I don’t love the way the layout currently happens, but it took 3 pretty simple steps:


Once a custom taxonomy gets added the default ones go away so tags has to be there, too.

   series = "series"
   tag = "tags"

layouts > partials > series.html

{{ if .Params.series }}
    <h4>This article is part of a series.</h4>
    <ul class="list-group">
        {{ range $num,$post := (index .Site.Taxonomies.series (index .Params.series 0 | urlize)).Pages.ByDate }}
            {{ if eq $post.Permalink $.Page.Permalink }}
                <li class="list-group-item active">
                    Part {{ add $num 1 }}: This Article
            {{ else }}
                <li class="list-group-item">
                    <a href="{{$post.Permalink}}">
                        Part {{ add $num 1 }}: {{ $post.Params.title}}

layouts > _default > single.html

{{ define "main" }}
    <header id="post-header">
        <h1>{{ .Title }}</h1>
        {{- if isset .Params "date" -}}
            {{ if eq .Lastmod .Date }}
                <time>{{ .Date | time.Format (i18n "post.created") }}</time>
            {{ else }}
                <time>{{ .Lastmod | time.Format (i18n "post.updated") }}</time>
            {{ end }}
        {{- end -}}
    {{ partial "series.html" . }}
    {{- .Content -}}
    {{ partial "series.html" . }}
{{ end }}

Adding a tags page

In addition to having it listed in the taxonomies section of the toml…

    name = "tags"
    identifier = "tags"
    title = "tags"
    pageRef = "/tags"
    weight = 20


combination of a tag cloud example and an example on how to list things alphabetically from the hugo website.

{{ define "main" }}
<h3>{{ .Title }}</h3>
<div id="theme-tagcloud" class="col-sm-12" style="margin-top: 15px;">
    {{ range .Data.Terms.ByCount }}
    <a href="{{ .Page.Permalink }}" class="btn btn-default" role="button" style="padding-right: 5px; padding-left: 5px;" >{{ .Page.Title }} <!--<span class="badge">({{ .Count }})</span>--></a>
  {{ end }}
{{ end }}


copy of the taxonomy.html from the etch theme.

{{ define "main" }}
<h3>{{ .Title }}</h3>
<ul id="posts">
{{- range .Pages }}
    {{ .Render "li" }}
{{- end }}
{{ end }}