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

January 21, 2021

Full Feed For Hugo Blogs

A subscriber of my blog (most probably the only one :D) recently made me aware that it won’t deliver a full RSS feed. I looked into this matter and found this highly helpful Hugo helpfile hidden somewhere in the Hugo the documentation (please note the slight irony). To enable a full RSS feed, do the following: Download the default Hugo RSS feed template and place it in some path/file mentioned here. 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

© ho1ger 2015 - 2022