Recent Posts (Page 4)

ferenc-almasi-HfFoo4d061A-unsplash.jpg
ferenc-almasi-HfFoo4d061A-unsplash.jpg

Some days ago I realised, that I keep all my configurations for GoHugo in the TOML format, while using YAML for the frontmatters in my content folder. That did not seem right ;) so I changed those too to TOML.

Photo by Yancy Minvia Unsplash
Photo by Yancy Min via Unsplash
November 2, 2021

Learning to git with git

I like to learn things by doing them. Recently I found a couple of interesting game formats that teach certain aspects of full stack developer’s life by playing a game. Let’s play? Oh My Git!is a game to learn Git, by using Git.

The greatest logo of them all
The greatest logo of them all

I had a weird reaction (““well… that’s a unique logo?”) to my really great weblog logo above recently, so I thought I might as well explain it.

Photo by Mick Hauptvia Unsplash
Photo by Mick Haupt via Unsplash

Golangs $date.Format is unable to add ordinal suffixes to dates (like 1st, 2nd, 3rd, 4th). Let’s not judge Golang for that. The following is how I remedy this issue: layouts/partials/func/formatOrdinalDate.html 1{{-$format:=.format-}} 2{{-$date:=.date-}} 3{{-$shortened:="th"-}} 4{{-ifin(slice12131)$date.Day-}} 5{{-$shortened="st"-}} 6{{-elseifin(slice222)$date.Day-}} 7{{-$shortened="and"-}} 8{{-elseifin(slice323)$date.Day-}} 9{{-$shortened="rd"-}} 10{{-end}} 11{{-return$date.

Photo by Christopher Gowervia Unsplash
Photo by Christopher Gower via Unsplash

If you are using the code styling functionality of GoHugo then you might have stumbled over a common issue when you are using Content Security Policies (CSP) and inline styles. Using CSPs is the proper way these days to secure your site code but it is considered (in the realm of CSPs) bad style to have your style sheets or JavaScript inlined into your page.

Photo by Gerry Roartyvia Unsplash
Photo by Gerry Roarty via Unsplash
October 27, 2021

Giscus Module for GoHugo

Giscusis a new star on the comment systems for static website generators orbit. It is inspired by the wonderful utterancesand uses Github Discussions to save comments. It’s open source, easily configurable, themeable, translatable, and you can host it on your own server(it’s JavaScript based) if you like.

Game Off 2021
Game Off 2021
October 23, 2021

Game Off 2021 Part I

Game Off 2021is this years iteration of a regular game development contest hosted by itch.io. I decided a while back to develop some form of program or game just because I can. This is the perfect opportunity to force myself to do so and I’ll program a little game throughout the month of November.

Photo by Ave Calvarvia Unsplash
Photo by Ave Calvar via Unsplash
October 21, 2021

(Another) new beginning

Hello again, Internet! You might not know me, but you probably already somewhere came across my work or myself if you ended up here. My name is Patrick (born 1975). I am a German, living on Koh Samui in Thailand and I am a web worker.