IndieWeb New Years’ Eve Commitment: Expanding my person tags

Published on under the IndieWeb category.

A screenshot of Aaron Parecki's name tagged in a blog post

@boffosocko.com mentioned a 2021 New Years’ Eve commitment page on the IndieWeb wiki in the community chat a few days ago. The goal of the page is to commit to doing something on your website and then to do it before the end of 2021. I found out about this challenge a few weeks ago but did not have any ideas on what I could commit to. Then, the very same @boffosocko.com mentioned an idea that I could add to my site: person tags.

Thinking about person tags

Person tags are a way to tag a person on a web page, similar to how one would tag someone on a social media platform. The tag should link directly to the person being tagged. This means that if someone sees a tagged name, they will be able to click on it to find out more about the person. Again, just how social media tags work.

I decided that I should create a syntax on my blog to support person tags. This syntax follows the @ method that many social media platforms employ. If I use an @ symbol, followed by a domain name, I could use that as a way to link to indicate to my website that I want to mention a particular domain. This approach means I don’t need to write out a full link to someone’s site with their name. An @ mention, mapped to a domain name, would do just fine.

I have already implemented this behaviour on my site. Now, I can use syntax like this:

[at sign]boffosocko.com

This syntax, using an actual at sign (the text above is to avoid it being turned into a mention), creates a link like this:

​@boffosocko.com

All links appear at the bottom of my blog posts in a “People mentioned in this post” heading. Behind the scenes, my static site generator looks for words beginning with @ in my blog posts (which excludes email addresses naturally because the at sign comes in the middle of an email address).

If the text after the @ sign is in a person_tags.json file, the name of the person to whom I am linking and the URL I have chosen to link to will be added to my blog post. This information is mapped in an object that looks like this:


    {
        "boffosocko.com": {
            "full_name": "Chris Aldrich",
            "url": "https://boffosocko.com"
        },
    }

The JSON object contains the @ mention text as a key and the attributes associated with the mention as another JSON value. A separate value for URL is specified so that the @ mention text does not need to be the same as a URL. For instance, I could change the file so that “chris” would map to the JSON object rather than “boffosocko.com.”

If the text in an @ mention cannot be found, my person tag will use the link after the @ sign that I provide. If I linked to @ google.com and I didn’t have google.com in my person tags list, the tag would be completed to link to @google.com directly, with the anchor text the same as the person tag. This is a good fallback in case I try to link to a resource that I haven’t added to my list of person tags yet.

My commitment

If I had thought about adding person tags to my site as an IndieWeb commitment before I implemented them, this post would have been about my intention to implement person tags. But instead I implemented person tags and then thought it would be a good commitment. Thus, I need a new commitment. I have decided that I would like to make my person tags richer and to make more of them. To do so, I would like to:

  1. Add a “logo” field to each person tag so that I can show their profile image at the bottom of my blog posts.
  2. Add all of the blogs I have written about in my Advent of Bloggers series to their own tags.

The image commitment will let me make the person tags look more dynamic. Expanding person tag support to my replies makes sense because those are posts where I may also tag another blogger or website. For the second commitment, I might write a program that lets me create a person tag so that I don’t have to write JSON objects for each site. I have not yet decided.

I promise to follow through on the three commitments mentioned above by the end of 2021.

Go Back to the Top