Jan-Lukas Else

Tech, life and everything else

πŸ‘¨β€πŸ’» Dev

Welcome to the Dev section of my blog with development related articles.


Cache Hugo modules in Drone CI

Published on in πŸ‘¨β€πŸ’» Dev

Today I modified my theme to use Twemoji for emojis. To add the SVG files to the theme, I used a Hugo module mount in the config of my theme:

View

β€œsans-serif” only

Published on in πŸ‘¨β€πŸ’» Dev

I used to use system fonts for my blog theme, but I rethought this decision and converted to the following font-family in my CSS:

View

Backup a dockerized Postgres database with Resticker

Published on in πŸ‘¨β€πŸ’» Dev

I got the question how to solve the problem that when backing up the storage of a dockerized Postgres database (using Resticker) it could be that the backup is corrupt because the database is still running.

View

Use Telegram as a notification service with Go

Published on in πŸ‘¨β€πŸ’» Dev

Telegram is my favorite messenger for chatting. There are many reasons for this. But Telegram is also very suitable to use it as a notification service for your own projects. For example I get a daily overview of the number of page views of my blogs, but also notifications about new Webmentions, or likes and announcements via ActivityPub are sent to me via Telegram.

View

How I use the Speech Synthesis API on my blog

Published on in πŸ‘¨β€πŸ’» Dev
Updated on

I just added the feature to my blog that allows you to have any article read to you. For some articles I already add an MP3 file with a natural sounding pronunciation, but now it is also possible to get articles read aloud that don’t have an MP3 file (if the browser and operating system support this).

View

Find broken links on your website with muffet

Published on in πŸ‘¨β€πŸ’» Dev

Today I wanted to check if my blog contains some broken links and it actually did. I used the Go-based tool muffet which crawls a website and checks for HTTP errors when following links. To speed up the process, I started a local Hugo server and used the following command for muffet (after installing it):

View

Using the Google Text-to-Speech API to create audio versions for blog posts

Published on in πŸ‘¨β€πŸ’» Dev

AshwΓ­αΉ… VΓ­shnΓΊ asked how I created the audio version for my latest post. Here’s a way how you can use the Google Text-to-Speech API to create MP3s from text. A simple way to try this API without a Google Cloud account is to follow these steps:

View

Pure CSS Lightbox in Hugo theme

Published on in πŸ‘¨β€πŸ’» Dev

Hugo themes have the option to override the default rendering of Markdown images by using β€œMarkdown Render Hooks” since version 0.62.0. By creating a file in layouts/_default/_markup named render-image.html it is possible to use a custom template for rendered images. This gives a lot of flexibility. I just used that flexibility to create a lightbox with pure CSS (without using JavaScript, like many lightbox implementations do). After clicking (or tapping) on an content image, you will see it filling the browser view. Another click brings you back to the content.

View

Adding ActivityStreams representations to Hugo

Published on in πŸ‘¨β€πŸ’» Dev
Updated on

I promised and people already asked, so here is the first part of the documentation about how I enabled ActivityPub support on my Hugo-based blog:

View

How I automatically create my blogroll

Published on in πŸ‘¨β€πŸ’» Dev
Updated on

I just updated my blogroll and thought that it might be a great idea to share my workflow to do exactly that. I use Miniflux a lot. Using Miniflux, I read all the blogs and get all the news, get updates from all the YouTubers and even subscribe to some Mastodon accounts (fediverse microblogs). I use multiple categories to sort the feeds. One of those categories is β€œBlogs” with all the blogs, which I also list on my blogroll.

View

Jan-Lukas Else