Make your website more printable with @print CSS
I just added some CSS rules to my Hugo theme to make my blog more printable. Why and how does this work?
Tech, life and everything else
Welcome to the Dev section of my blog with development related articles.
I just added some CSS rules to my Hugo theme to make my blog more printable. Why and how does this work?
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:
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:
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.
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.
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).
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):
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:
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.
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: