How I push updates to my blog

When setting up my blog, I decided that the only action I wanted to do to update the live version was to do git push. To implement this, I skipped setting up a webhook server because I didn’t want to install the webhook server directly on the host : this would have used a port and required manual configuration of my reverse proxy (I use traefik). Instead, I implemented it with :...

September 22, 2021 · 2 min · Jonas DOREL

Hugo - Link another page with a shortcode

In Hugo, I sometimes want to link to other posts in a see also section. I want to just give the post name and be done with the link. However Hugo only provides ref and relref. So I made the following shortcode in layouts/shortcodes/link.html : {{ $pageName := index .Params 0 }} {{ with .Site.GetPage $pageName }} <a href="{{ .RelPermalink }}">{{ .Title }}</a> {{ end }} When called liked this in a page :...

September 19, 2021 · 1 min · Jonas DOREL