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: