Web Development

Passing Data into SVG Linked Parameters Workaround

I wanted to share this link for a while. I do not know if I will be able to use it in the future, but I am hoping that someone else will find it inspiring.

Sometimes, something new interacts with one of these older ideas and leads to something interesting. This article is about one such case: a hacky technique that allows us to pass some data from CSS to SVG and use it to adjust colors or almost anything else.

Microfeatures I Love in Blogs and Personal Websites

I remember this post shortly before I saw everyone posting about their slash pages. You can do whatever you want on your blog! For better or worse.

I've been on the lookout for ways to improve the site, and I've seen quite a few little things that are nice to use, but relatively easy to implement. They don't really make or break a website; the absence of such features might be noticed, but will not cause any disruption for the reader. On the other hand, their presence serves as a QoL enhancement.

I’ve been meaning to share this link for a while and I feel that going to the last IndieWeb Homebrew club meeting brought up some thoughts and feelings that I’ve been having.

For one, how much of my writing is not about features that I want to add to my site. What do I want to say on the inter webs? What am I trying to say?

The older I get the more I feel that links should be underlined.

I'm tired boss... upcoming deprecations

I've been working on an update for my website theme to scratch a technical curiosity I was feeling related to authorship of individual posts in comparison to the entire site. After reading a couple resources, I decided to ask on the Hugo forums if there was an ideal way to add author information. I kept running into an issues and figured that it might be related to the version change.

Hugo deprecation warning
Warnings are future errors. A technical debt for waiting to come due.

Here are the warning messages if you want to read over them.

WARN  The "gist" shortcode was deprecated in v0.143.0 and will be removed in a future release. See https://gohugo.io/shortcodes/gist for instructions to create a replacement.
WARN  The "twitter", "tweet", and "twitter_simple" shortcodes were deprecated in v0.142.0 and will be removed in a future release. Please use the "x" shortcode instead

I have flashbacks of when I was working with another static site generator called Pelican that I enjoyed for many years until one day I did an update1 that took the site down because I had to find fixes for all the different components that weren’t working anymore.

On some levels, I understand that I don’t need to upgrade and that’s part of why I’m on my current hosting provider. The point of my blog is to communicate with the World Wide Web, get my thoughts together, and fulfill that part of me that likes to create. I feel that some of the things that I create for this blog are only used during the creation and never utilized afterwards.

What’s frustrating about these warnings are they are related to shortcodes built into Hugo itself. They are part of the documentation and examples that Hugo has to showcase what the project can do. I feel that it’s a real help when writing an article to avoid pasting the larger and larger code blocks used to embed something into a post. But with the changing technical and political landscapes, I can see why these changes are coming.

I’m sad.

Further bitrot.

I’ve already removed most if not all of the twitter links on my site and based on the last time I checked traffic, no one was reading it anyway. The gist changes are a little sadder for me because I was using them as reference in some of my favorite posts and I feel that people still read those.

But, I’m not updating the version today

The current version on the server is 0.117 and that’s been really solid. There is a version .140 that’s available but I wasn’t able to get it working.

Problem for stoot

I was able to take a code sample from Bryce last year and make it a plugin for Micro.blog users and I named it stoot after the shortcode that Bryce used for it. Unfortunately, it’s now giving me an error in my local environment.

The following is a truncated snippet of the error.

ERROR render of "/" failed: failed to render shortcode "stoot": failed to process shortcode: "/Users/mandaris/Code/local-hugo/themes/stoot/layouts/shortcodes/stoot.html:13:28": execute of template failed: template: _shortcodes/stoot.html:13:28: executing "_shortcodes/stoot.html" at <$urlToGet>: can't evaluate field Err in type resource.Resource
---
toot.html:13:28: executing "_shortcodes/stoot.html" at <$urlToGet>: can't evaluate field Err in type resource.Resource: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/

And yes, it did say toot.html even though it was from stoot.html. One problem at a time!!

The code in question:

{{- with resources.GetRemote $urlToGet  -}}
	{{ if (resources.GetRemote $urlToGet).Err }}

Next action(s)

I’ve decided that my next actions will be the following.

  1. Ignore the gist issue. It’s marked for a future release and there are directions on how to replace it. I have a about a handful of examples in my test suite of content (mostly the same code but on different pages)
  2. Learn how to keep multiple copies of Hugo local so that I can test this kind of thing easier.
  3. Learn how get replacement to work according to the error message.

  1. I took it for granted that a project would just work better after and upgrade; all reward and no consequences. You should not only backup your content but the environment. Look at how much work people maintain game emulators do in order to keep their backups running. ↩︎

Updates to the theme: Play-Lab

I’ve switched to another theme so that I could feel that I can make more drastic changes and customizations without worrying about effecting other people.

I’m calling this version 1.4.0 and would like to know what others think.

Key changes in this one are as follows:

  • Change the font to Atkinson Hyperlegible
  • Make the index only show the posts with titles
  • Attempt to remove h-feed from single pages
  • Correct header values on archive page
  • Add view-transition to meta tag in header
  • Change default OpenGraph image to not have words
  • Remove border and filter around <figure>
  • Add margin-top and change line-height on <figcaption>

I’ve got two other major changes that I’m still working on. Really highlights why you should do branching for both personal and professional projects.

Upcoming projects

  • Author page
  • Share buttons using the webshare api
  • Changes to stoot due to Hugo method deprecation

Did the CSS naked day and it’s a little weird to see how large some of the assets I’m using are.

Homebrew Website Club Meeting (2025-02-05)

Everyone in the meeting wearing hats

I stopped by the European chapter of the IndieWeb group during my lunch and I feel that I got a lot of out it. We went over a lot of different things but here are some of my favorite highlights.

4 oh 4 pages

I joined the meeting late and caught the tail end of discussions about what other people do when someone tries to go to a URL that doesn’t exist under their domain. I remember seeing some sites redirecting the user to the home page after a minute or two or showing links to other pages that match some kind of pattern within the url.

IndieWeb Movie Club

Mark Sutherland will be spearheading this month’s movie club. The topic will be any version of Romeo & Juliet. I originally planned on the 1996 film Romeo + Juliet because that’s the one that has my favorite version of Tybalt, but I might just go with Gnomeo & Juliet instead.

Mad as a Hatter

Just a moment where we took some time to get a hat from around where we live and put it on.

Serious stuff.

Validating my Feelings/Website

We had a very nice discussion on what makes a page valid. We started with what colors someone should use when putting together and what considerations to make. I tooted my own horn about how my webpage is valid only to find that it has a lot of things that some validators might not like.

It further emphasized the point that you should continually test your site. Things do change over time and it gives you a chance to rethink things. In my case, I got a chance to question whether my choice of having meta tags containing the trailing slash like the following:

<meta itemprop="wordCount" content="23" />

For me, it’s a reminder of the connection between HTML and XML. At some point, I have to make the decision on when is enough enough.

I also think I found what was causing the issue with my header.

I was using text-wrap: balance for all headers and it was causing some unforeseen problems when it comes to having an image in the header. I removed it and haven’t seen the issue since.

I’ve been scratching my head trying figure out why this is wrapping improperly.

Last year someone shared a snippet to have Hugo only show the posts with titles. I thought I would remember it.

Does anyone know what I’m talking about?

{{- range ( .Paginate (where .Site.RegularPages "Type" "post" )).Pages }}

Sometimes I find some good stuff on Bluesky.

Generally we think of alt-text as the domain of those with accessibility needs.

However alt-text is useful for many reasons, which benefit your viewers, as well as you, the creator!

[image or embed]

— alex (@dremenec.com) October 28, 2024 at 3:20 PM