My blog is built using the Hugo static side generator, using a lightly forked version of hello-friend-ng.

Until yesterday, the only change was to strip prism.js to slim down the site (not upstreaming this yet until I could figure out a way to selectively disable it on pages that don’t need it).

Yesterday I sent back my first two pull requests though:

  • PR 257 fixing links in the SVG documentation
  • PR 258 adding an SVG icon for Pixelfed, a decentralized alternative to image-sharing social networks such as Instagram or Tumblr

It’s a fun little weekend exercise. At the beginning I was looking at previous pull requests adding other icons, and noticed, huh, you just copy the <svg> parts of a file to the master list of all SVG icons, that’s easy. Pixelfed is open sourced, of course, so grabbing the initial SVG just involves looking at its Git repo.

The next problem comes with downsizing the image – the initial Pixelfed icon is 50x50, the hello-friend-ng icons are all 24x24. Inkscape happily resizes the icon (after figuring out that first I have to select all elements, then also resize the document canvas afterwards) – but when I plug in the paths I noticed I’m only getting the upper left corner of the image!

Turns out scaling an SVG image in Inkscape just ended up adding a transform="scale(...,...)"attribute to the path, and I would rather not have to copy this part as well. Stack Overflow to the rescue: the inkscape-applytransforms extension does exactly this, rewriting the paths to hae the transformation applied.

Since I install Inkscape from Flathub, the one minor change is that the extensions have to be copied / symlinked to ~/.var/app/org.inkscape.Inkscape/config/inkscape/extensions rather than the locations specified in the repo, but after that everything works great! Really glad that all the social profiles I list on my blog are now FLOSS and self-hosting capable (and many are federated) except for GitHub.

This post is day 12 of my #100DaysToOffload challenge. Visit https://100daystooffload.com to get more info, or to get involved.

Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~michel-slm/public-inbox@lists.sr.ht [mailing list etiquette]

Posts are also tooted to @michel_slm@floss.social