#microformats 2025-12-11
2025-12-11 UTC
Dryusdan and alabut-on-his-ce joined the channel
#
[Al_Abut] oof, I can’t decide if microformats should be my create day project for day 2 of IWCSD
#
[Al_Abut] I’m leaning towards “yes” for making a page-feed-combo-thingy for my photos
#
[Al_Abut] probably going to have to make a whole new page with just the photos, not the albums, right…?
sebbu2 and m0suli joined the channel
#
[Al_Abut] oh nice, yeah that’d be great to get your eyes on this because I don’t think I can wait until Sunday to tackle it
#
[Al_Abut] partly out of enthusiasm but also because the script I have would be way better if instead of “I’m excited about adding microformats” I said “I did add it and it was super easy”
gRegor joined the channel
#
[Al_Abut] So here’s why I thought I’d have to make a new page - I have two types right now, one I call the gallery:
#
[Al_Abut] https://alabut.com/photos/
#
[Al_Abut] Which doesn’t seem to map cleanly to the gallery definition in our wiki, where it seems to be defined as synonymous with albums or collections. I’ve been using it to mean the view of those types of posts, if that makes sense, so a gallery is like an album of albums…?
#
[Al_Abut] Then there’s each album itself:
#
[Al_Abut] https://alabut.com/photos/mudfun/
#
[Al_Abut] I guess I could make that first gallery page a feed and each thumbnail would then link to the respective album, but I prefer to have full-content feeds instead. So to do that I’d have to make a new page that has all of the photos from all of the albums, right? With the photos sorted in reverse chrono and grouped into “posts” for each album. Then every other page would link to that one as the feed view.
#
[Al_Abut] Does that make sense? Am I overthinking the architecture?
#
[Al_Abut] also, no worries if this doesn’t make sense over text, it can wait until iwcsd, no problem
#
[Al_Abut] Sure thing!
#
[Al_Abut] I have a lot of basic ground to cover before then anyway. I’m cruising through MDN right now.
#
[Al_Abut] That’s an interesting generalization. I guess that would apply to category or topic pages?
m0suli joined the channel
#
[Al_Abut] Yeah, I can see that. For my specific use case, it feels like a short description-only feed vs one with full content. My current gallery page would be the description only feed because it would just have the thumbnail for an album and link to the full thing, so that’s why I’m thinking I need a new page that has all of the photos in them to be full content.
#
[Al_Abut] [tantek] ok, I think I’ve got a working demo of what I was trying to describe and it seems to work in the Monocle preview tool.
#
[Al_Abut] I started with a feed where each item is a single photo, like in my gallery view: https://alabut.com/projects/microformats/photos/photo-feed/
#
[Al_Abut] Ideally you’d want to be able to alternate between posts that have a single photo or a set of photos, like the post vs carousel on IG: https://alabut.com/projects/microformats/photos/combined-feed/
#
[Al_Abut] Then I made each entry have multiple photos, like I’d want from a “full content feed” I was trying to describe earlier: https://alabut.com/projects/microformats/photos/album-feed/
#
[Al_Abut] They all seem to work ok in Monocle: https://monocle.p3k.io/preview?url=https%3A%2F%2Falabut.com%2Fprojects%2Fmicroformats%2Fphotos%2Falbum-feed%2F
#
[Al_Abut] But have no idea if the rest of it is valid because the state of microformats validators is extremely confusing to me at the moment.
#
[Al_Abut] But if I’m on the right track, then tomorrow I’ll start trying to figure out Granary
gRegor joined the channel
#
[Al_Abut] Oh holy 💩 Granary turned out to be the easiest part! I just walked through [capjamesg] tutorial and ended up with this:
[dshanske], GWG, [artlung], [morgan], [jeremycherfas], [jeremycherfas]1, [artlung]1 and sebbu3 joined the channel
#
[Al_Abut] Oops, I got on a roll and I’m still up. I made a feed of all my photos, sorted by albums!
#
[Al_Abut] The page/feed combo: https://alabut.com/photos/feed/
#
[Al_Abut] The Monocle preview: https://monocle.p3k.io/preview?url=https%3A%2F%2Falabut.com%2Fphotos%2Ffeed%2F (not sure why the third article is jigsawed like it’s missing images when it isn’t)
#
[Al_Abut] Would love some pointers or corrections on the underlying markup or anything else. Woooo…
[Murray], [Trevor_Morris], Dryusdan and jacky1 joined the channel
#
jacky1 This is going to be my contribution to the indieweb advent https://imgur.com/a/uBh2GlS
#
jacky1 almost done with it but this has been on my todo list for a _while_
[schmarty] joined the channel
#
[schmarty] jacky++ wow!
#
[Al_Abut] Very cool. Also - is there a comprehensive reference list of classes somewhere? The hardest and most mysterious part turned out to be finding them and I still don’t know if I’ve used the right ones. All the docs have wildcard statements like u-*
[manton] joined the channel
#
[schmarty] [Al_Abut] i'm not aware of a flat listing, but there are some published vocabularies and suggested properties: https://microformats.org/wiki/Main_Page#Vocabularies
jacky1 joined the channel
#
jacky1 It's derived from the Microformats wiki, yeah. Wasn't hard to turn it into a schema (this'll emit that too so JSON Schema could be used but obviously, YOLO)
#
[jgarber] [edit] capjamesg I’ve been working off of: https://github.com/microformats/microformats2-parsing/issues/7
vhbelvadi joined the channel
#
[Al_Abut] ↩️ Good god no 😆
#
[Al_Abut] Also the photo-specific seems stalled or stubbed out? E.g. u-photo is a 404 in the wiki search, even though it shows up briefly in places like that page.
gRegor joined the channel
#
[Al_Abut] I can try to retrace last night’s steps. Might be futile - I opened a flurry of tabs trying to find and make sense of which classes I was supposed to be using.
#
gRegor [Al_Abut], if you're curious about the naming conventions and how they should parse, this section might help: https://microformats.org/wiki/microformats2-prefixes#naming_conventions_for_generic_parsing
#
gRegor That (intentionally) lists the wildcard syntax. Might help when you're reading a specific spec like https://microformats.org/wiki/h-entry to understand why some properties have a p- prefix vs a u- prefix, etc.
[aciccarello], barnaby and Dryusdan joined the channel
[snarfed] joined the channel
#
[snarfed] from https://microformats.org/wiki/microformats2#v2_vocab_notes : "All v2 vocabularies are defined as flat lists of properties of an object/item"
#
[snarfed] plenty of structured data frameworks do single vs multiple vs nullable etc, mf2 is unusually that it doesn't, but it's trying to cater to web publishers, which (the mf2 designers maybe thought) tend to be less technical and less interested in getting technical specifics right, so it tried to be simple and forgiving
jeremycherfas joined the channel
#
gRegor https://github.com/barnabywalters/php-mf-cleaner is the PHP one I'm more familiar with, might find some ideas there: https://github.com/barnabywalters/php-mf-cleaner
#
gRegor Here it is: https://indieweb.org/mf2util
