August 11, 2022

Hugo Shortcode für PeerTube

PeerTube ist eine Alternative zu YouTube die ähnlich wie Mastodon das ActivityPub Protokoll spricht. In Hugo können von Haus aus YouTube-Videos per Shortcode eingebettet werden, PeerTube wird nicht unterstützt. Es ist aber sehr einfach die identische Funktion für PeerTube nach zu rüsten: Im Ordner themes/THEME_NAME/shortcodes erzeugt man eine neue Datei mit dem Namen peertube.html. Da hinein packt man folgenden Code: <style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } . Read more

May 23, 2019

Deploying a Website with and Gitlab CI/CD

When I need to build a website, I typically use Hugo to generate the .html from .md. However, one thing is a bit inconvenient: deployment. If not done right, you have to do that manually (edit -> hugo -> rsync). Alternatively, and much better, you can use the Hugo-Gitlab|Hub-Netlify-toolchain I described earlier. These day, I needed a website for a new research project of mine and didn’t want to ship the site with Netlify. Read more

August 10, 2018

Domains and Sub-domains for Home-Hosted Services

I like to host (most of) the web services I use for my daily routine at home. Recently, I started shipping services using Docker containers. To make these services available via a public IP address and to conveniently enable HTTPS, I decided to use nginx as a reverse proxy. So the dockerized service becomes available via something like https://mydomain.dyndnsservice.xy/servicename. At least this was the plan. Unfortunately, I ran into the always same problem when I tried to coax a dockerized service to live happily in a “sub-folder” of my dynamic DNS domain. Read more

July 14, 2018

Deploying a Website with,, and

Since a good while I use the static website generator Hugo for my Blog (which (by the way) is back online since a few days (minus the photos) after I got rid of my vServer last month). As I do not have this vServer anymore, I neither have a repository that keeps track of my website’s source code, nor a machine that will automatically build the website’s html whenever I change something, nor a public web server to serve the website’s html. Read more

May 31, 2017

Testing Guetzli - Google's Perceptual Image Encoder

… a quick test of the Guetzli JPEG encoder published some weeks ago by Google. To my big surprise, you cannot encode TIFF or another lossless image format into JPEG. You need to export your RAW camera file first to JPEG @ 100% quality. Then you encode that file with Guetzli. Seems a tad odd to me, as you have a lossless compression two times. The speed of Guetzli is furthermore quite disappointing. Read more

May 12, 2017

How to Display a Featured Photo on a Hugo-Powered Photo Blog's Front Page

I use the static website generator Hugo for this homepage. However I find that Hugo’s capabilities are somehow restrained if you post a lot of photographs like I do. So far my approach has been to automatically generate markdown that includes the photos I want to show in a post chronologically. Furthermore I enforce that only the first photo is shown on the homepage with the ` Read more

January 2, 2017

Automatic Renewal of Let's Encrypt Certificates

Since a couple of months I deliver all my websites by HTTPS only. Certificates are issued by Let’s Encrypt and I use Certbot as a certification client (hope that is the correct word). This works quite well, actually. However, the certificates from Let’s Encrypt have one drawback: they expire after 90 days. Hence, you need to renew the certificate now and then. The description from the Certbot page does not work for me as the renew verb of the certbot command would create one certificate (with many common names) for all pages served by the server. Read more

© ho1ger 2015 - 2022