Open zcdunn opened 5 years ago
Could you give an example of what these are / how they would be used here? What specific html items should get these tags, and what should they be?
Sure. Microformats are just class names applied to the HTML that describe the content. So if you have a user account, you would mark it up with an h-card
class.
Here's a full example from the microformats site: `
Mitchell Baker (<a class="u-url" href="https://twitter.com/MitchellBaker" @MitchellBaker) Mozilla Foundation
Mitchell is responsible for setting the direction and scope of the Mozilla Foundation and its activities.
Strategy Leadership
You can see the parent container gets an h-card
class, the element containing the user's avatar source url gets a u-photo
class, any element linking to a url representing the user gets a u-url
class, and the element containing their name gets a p-name
class.
Posts and comments work similarly but use an h-entry
for their root class.
Is this similar or dissimilar to opengraph tags?
I guess microformats are similar to opengraph, but the usecase is different. My understanding is that opengraph is mostly used for link previews, while microformats are used to provide a machine-parseable version of content. Clients that implement Microsub can subscribe to feeds marked up with microformats. So I could use Monocle, or any other conforming client, to subscribe to a Lemmy user/forum.
A webpage with an h-feed
that contains a few h-entry
's will be a human readable page and a machine readable feed, equivalent to having a webpage and an RSS/Atom feed.
Ah, I see.
--From the indieweb website
Microformats are simple HTML markup that describe the content. Marking up users, posts, and comments would allow interoperability with indieweb site/tools.
Within the fediverse, Plume, Prismo, and Mastodon all have support for microformats.