Skip to main content

This is a new website theme. Help me improve it and give your feedback (opens in a new tab).

Hugo

Shortcodes for my Weekly Reports

I’ve been writing weekly reports on my free software activities for over a month now, so I’m looking at ways of making these easier to write. Each review takes about an hour to write up, and I’m spending enough time formatting links to packages and bug reports that I’ve written some Hugo shortcodes to help.

For Debian:

{{ with ( .Get "bug" ) }}{{ range ( first 1 ( split . "," ) ) }}<a href="https://bugs.debian.org/{{ . }}">#{{ . }}</a>{{ end }}{{ if ( ( gt ( len ( split . "," ) )  1 ) ) }}{{ range ( after 1 ( split . "," ) ) }}, <a href="https://bugs.debian.org/{{ . }}">#{{ . }}</a>{{ end }}{{ end }}{{ end }}
{{ with ( .Get "src" ) }}{{ range ( first 1 ( split . "," ) ) }}<a href="https://packages.debian.org/source/sid/{{ . }}">{{ . }}</a>{{ end }}{{ if ( ( gt ( len ( split . "," ) )  1 ) ) }}{{ range ( after 1 ( split . "," )) }}, <a href="https://packages.debian.org/source/sid/{{ . }}">{{ . }}</a>{{ end }}{{ end }}{{ end }}
{{ with ( .Get "pkg" ) }}{{ range ( first 1 ( split . "," ) ) }}<a href="https://packages.debian.org/sid/{{ . }}">{{ . }}</a>{{ end }}{{ if ( ( gt ( len ( split . "," ) )  1 ) ) }}{{ range ( after 1 ( split . "," )) }}, <a href="https://packages.debian.org/sid/{{ . }}">{{ . }}</a>{{ end }}{{ end }}{{ end }}

For Tor Project:

Breaking RSS Change in Hugo

My website and blog are managed by the static site generator Hugo. I’ve found this to be a stable and flexible system, but at the last upgrade a breaking change has occurred that broken the syndication of my blog on various planets.

At first I thought perhaps with my increased posting rate the planets were truncating my posts but this was not the case. The problem was in Hugo pull request #3129 where for some reason they have changed the RSS feed to contain only a “lead” instead of the full article.