Webmentions are a useful way to notify a website that you have linked to it. Microformats like h-entry combined with u-in-reply-to, u-like-of, u-bookm

How to Send a Webmention with h-entry

submited by
Style Pass
2024-11-16 00:00:16

Webmentions are a useful way to notify a website that you have linked to it. Microformats like h-entry combined with u-in-reply-to, u-like-of, u-bookmark-of, or u-repost-of give context to the mentions.

Sending a Webmention means POST-ing to a Webmention endpoint with the data source and target. The source is the URL of the page that contains a link to the URL target. Note that a standards-compliant recipient will discard1 Webmentions if the content of the source page does not contain a “per-media-type” mention of the target URL. For example, and HTML source might contain an <a href> or <video src> matching target URL and a JSON source could contain any key whose value exactly matches target. A plain text document would need to contain the target URL verbatim.

While simply notifying a site that you’ve mentioned or linked to it is nice, without additional context the Webmention might not be very useful. Adding context using h-entry, ideally with embedded h-card and h-cite Microformats, can give the recipient more information about what the link means and potentially how to display it. For example, Hearthside (this site) via Mentionable will happily store any Webmention sent to it provided that they’re valid. Only Webmentions that contain h-entry with at least e-content or e-summary will be displayed at the bottom of the page as comments.

Leave a Comment