"K" Theme MF2 Markup Update
(Skip to the end for the TL;DR summary)
After an evening of debugging and rewriting sections of the HTML in āKā, I think Iāve fixed the markup and parsing issues I mentioned yesterday.
It turns out that X-Ray, the parsing engine used by IndieNews, Aperture, and probably others, was only finding the sidebar h-card in my markup. The rest of the content was being ignored. Iām not entirely sure why this is, to be honest, but it gave me a place to start.
Working from the (admittedly shakey) basis that if the parser was only going to find one mf2 entity on the page, then Iād want it to be the main h-feed or h-entry⦠so I started moving around some blocks of HTML and a few classes, and stripped out a few likely redundant pieces of HTML.
This⦠worked! The feed would show up in the X-Ray output instead of the h-card, and wasnāt all that different in the Pin13 parser compared to yesterdayās results. But it was far from ideal. The authorship information on every feed entry was screwed up; Iād made a change yesterday so only one full h-card was on the page (the sidebar) and followed the recommendation to markup the h-entry author details with u-author instead. Now came the conundrum: do I add back in a dedicated h-card to every h-entry, and by doing so re-break some of the other parsers looking for a single ārepresentitiveā h-card? I tried out adding them back in, just to see what happened. X-Ray was still fixed, but IndieWebify.me complained about it, and the IndieWeb Webring still couldnāt work out who I was.
I could have left it here. X-Ray was the main target, IndieWebify might not have liked it but could at least still see some details, and IndieWeb Webring was a ānice to haveā in a way. But truth be told, it would have nagged at me. What if these āminorā issues were the proverbial canary? I want to achieve the widest possible compatibility now, to reduce potential issues at a later date.
It was around about this point that I remembered that an h-feed itself could have its own embedded h-card, which could potentially solve the issue. After moving my āh-feedā class to the body element, instead of the main Iād been using up to then (so now it would use the sidebar h-card to represent the feed), it more or less did solve the issue.
It threw me at first that X-Ray didnāt list a separate h-card item like Pin13 did, but instead used the feed h-card for the authorship of every nested h-entry. Removing the now redundant author h-card from the entries stopped IndieWebify from grousing about these multiples. Oh, and hereās my new profile page on the IndieWeb Webring. Even my test microformat-based feed in Aperture/Monocle started displaying posts almost immediately after applying the change.
So, TL;DR: I moved my main h-card inside the h-feed, instead of it being a distinct entity on the page. By doing so I fixed pretty much all of the microformat parsing issues I was experiencing, which means āKā has taken a big leap forward⦠and I can stop pulling my hair out ?
Shared to IndieNews (maybe) and IndieWeb.xyz.