TIL: Fixing the author card on my home page h-feed
Written by James. Published on under the IndieWeb category.
Assumed knowledge: This post assumes technical knowledge with microformats2. This post is most useful for someone debugging authorship relations on their h-feed or for community members who want to discuss documenting this pattern.
Monocle, the social reader I use to follow blogs and IndieWeb community members, shows information about the author of a post if said information is available. Every so often I wonder why my name never showed up next to my posts in Monocle. I subscribed to my home page which contains both a h-feed and a h-card on the page.
Today, I finally figured out why the authorship information did not appear: I did not provide a p-author attribute on my h-feed to indicate that my h-card was linked to my feed.
I made two changes to my feed today:
- I moved the h-feed class to a component that includes both my list of h-entries and my h-card.
- I added a p-author class to my h-card as per the microformats2 h-feed specification. This tells a microformats parser that the linked h-card contains information about the author of the feed.
Here is my rough microformats structure now, represented as a tree:
h-feed h-card h-entry h-entry more h-entries...
Now, when I open up Monocle, the social reader I use, I see my name, my domain name, and the profile picture that are all part of my h-feed.
Here is how a post looks for me now:
I was surprised that I needed to explicitly state that a h-card was the author of a feed, although this makes sense. Part of me wonders whether there could be an "assumed author" that is inferred if a page contains a h-feed with a h-card that appears outside of the feed. But this could complicate markup if a page contains multiple feeds with different authors. In any case, I would be curious to learn whether there have been discussions about this in the past. In any case, I solved my original problem.
Tagged in IndieWeb, microformats, web.
Read more content like this
Check out the other posts I have written related to this article.
- Coffee Chat with Jamie from Luckie Beans
- The Coffee Dictionary Book Review
- My two-cup Chemex recipe
- The Chemex: A week or two on
- More testing with the Hario V60
Powered by Novacast
Comment on this post
Respond to this post by sending a Webmention.