How to dynamically generate images with Node.js

🚫 Problem Having to manually 😴 create unique images for Social Media (Open Graph) for your new blog posts. ✅ Solution Let’s use Node.js to engineer a script to take care of this for us 😎 ❤️ Generated image This is the final result, a dynamically generated image: 🤔 How does this work? A part […]

Defer CSS loading with WordPress

So you’re learning about Critical Rendering Path, you have already optimized your WordPress theme’s stylesheet but still there are WordPress core CSS files that you want to lazy load. I have a present for you 🎁 One of several techniques is to load the stylesheet using media=”print” which tells the browser this file is meant […]

How to list recently edited pages in Hugo

The following snippet will list your Hugo site pages ordered by last modification date. You simply have to reverse it and limit to your liking. Shortcode themes/YOUR_THEME/layouts/shortcodes/last-edited-pages.html How to use?

Moving from Docusaurus to Hugo

For static generated sites I’m loving more everyday Hugo. It’s speed and zero JavaScript dependency (unlike Gatsby) is just what the doctor ordered. I have a private wiki for my, well, not public notes. The first version was done with WordPress (I even open sourced the theme). It worked okay, nice writing experience, one click […]

Generating book lists from my Goodreads profile

If you read books you have perhaps heard about, the site has book reviews, season awards, and more. The most interesting part is that you can track you read, currently reading and want to read books. Yes, you could use a notepad or a spreadsheet 🤷‍♂️ but using the site is nice. You can […]

How to create a news digest using RSS and GitHub Actions

One of my daily morning routines is to scan several news sites and read headlines to see if anything piques my interest. Or at least to have a vague recollection of topics happening nowadays. I go to Hacker News, The Verge, The Guardian… and others. A mixed bag, really of tech and world news. Because […]

How to defer scripts in WordPress

You don’t need me explaining you how important it is to defer scripts for performance. If your application doesn’t need render-blocking scripts you should simply defer them. Most of the WordPress blogs/sites do not need render blocking scripts, for toggling menu visibility, swapping emojis for SVG’s, embed media… All these can be deferred no problem. […]

How to create custom commands for Mac’s Spotlight

Out of the box doesn’t seem to be possible 🙁 BUT! I’ve found a workaround that works almost as nicely 🎉 There are paid apps out there, but we as developers should do it ourselves 👨🏻‍💻 To learn from it and to feel like a hacker. 💡 Create a bash script I want to able […]

How to do multiple StaticQuery in Gatsby

If you need to do more than one GraphQL StaticQuery in Gatbsy you can assign each query to a name. Then simply access data.yourName and you’re ready to go. Here’s a full example of how I use it on my reviews site:

How to remove client-side JavaScript from Gatsby

I build my reviews site using Gatsby. It’s cool, the graphql is powerful but there’s something that was buggering me. Why does my static site need client-side JavaScript? There’s no reason for it. Gatsby will argue about faster route changing this way, sure. For a high-traffic site where users visit multiple pages on the same […]