Webmentions on a static site with GitHub Actions

| 6 min read

Last year, I added webmentions to this blog. To recap, webmentions are a web standard to create a network of comments, likes, and reposts between ordinary sites. I set up a brid.gy account to poll Twitter for webmentions targetting my blog, and I caught them with webmention.io.

Webmentions were fetched with AJAX and rendered at the bottom of each page. There were two things I didn't like about this approach:

  • I'd rather just have them prerendered by Hugo, my static site generator
  • Webmentions are stored on Webmention.io, but I'd rather have ownership over them

After some tinkering, I came up with an alternative: a cron-based GitHub Action that queries webmention.io for new webmentions. The Action then commits them to my site's repository, so I can access the data with my static site generator, Hugo.

Read more

Composer, semver, and underlying dependency changes

| 2 min read

Every now and then I need to bump a dependency in a package, or require a higher PHP version.

      "name": "my/package",
      "require": {
-         "php": ">=7.2.0",
+         "php": ">=7.4.0",
-         "league/commonmark": "^0.19",
+         "league/commonmark": "^1.0",

When updating an underlying dependency, I don't always tag a new major version. Some people consider this to be a breaking change, but it isn't. Here's how to deal with dependency and language updates from a package maintainer's perspective.

Read more

Privacy and having nothing to hide

| on pjrvs.com

I've always had a hard time finding a proper response to the classic “privacy isn't important because I have nothing to hide” argument.

Paul Jarvis, cofounder of the privacy-first analytics tool Fathom Analytics, makes some strong points in But I have nothing to hide.

Whether it’s on reality TV or even just social media, we act and speak differently because we know we are being watched. We lose our ability to be authentic or explore our own identity and views because we're stuck trying to put forward our “best selves” and ensure everyone else that we’re here “for the right reasons”.

Read the full article on pjrvs.com.

Setting up a global .gitignore file

| 1 min read

Reviewing pull requests, I often see contributors sneakily adding editor configuration to the repository's .gitignore file.

+ .vscode

If everyone would commit their environment-specific .gitignore rules, we'd have a long list to maintain! My repository doesn't care about your editor configuration.

There's a better solution to this: a personal, global .gitignore file for all your repositories. Here's how you can set one up.

Read more

Give it five minutes

| on signalvnoise.com

I came across this post by Jason Fried (from Basecamp) about giving ideas a few minutes before shooting them down.

I've caught myself blurting out unnecessary negative opinions when presented with an idea. More often than not, I have more empathy towards the idea a few minutes later, and feel bad about my initial reaction.

Next time you hear something, or someone, talk about an idea, pitch an idea, or suggest an idea, give it five minutes. Think about it a little bit before pushing back, before saying it’s too hard or it’s too much work. Those things may be true, but there may be another truth in there too: It may be worth it.

Read Give it five minutes on signalvnoise.com.