Documentation » The “Context” Block

The “Context” Block

The Context block lets you add a correctly microformatted “introduction” (i.e., “context”) to notes (or likes).

“h-feed” readers and Webmention endpoints use these microformats—small bits of metadata, right there in your pages’ HTML—to recognize post types, author information, and so on.

When you create a new note or like, you’ll be presented with not just a Context block. If you open the List View, you’ll notice a Group block as well, with an empty Paragraph in it. (The Group has been given an e-content class.)

The idea behind this block template is to get you started right away.

WordPress’ block editor. A new note is being created. The List View is expanded, and shows the different blocks.
A brand-new note. The List View shows the blocks that are added by default.

Using the Context block is as easy as copy-and-pasting a URL in the URL field, and selecting a “post type.”

Here’s one example, of a “reply.” I added the URL of the post I’m replying to, and chose the “Reply” type.

I then typed a quick note underneath.

WordPress’ block editor. A new “reply” is being created.
A dead-simple “reply.”

Under the hood, this block template will produce just the right HTML to make microformats parsers properly interpret this post (on the condition that your theme, too, supports microformats).

If your active theme is a so-called “block theme” and thus supports the new Site Editor, you could try IndieBlock’s “Microformats” option.

It’ll add microformats to the core WordPress blocks that make up your theme templates. Not all themes, however, always load all of these blocks—some familiarity with the Site Editor will definitely come in handy!

If you were to somehow delete all blocks and manually (re-)add just the Context block (but not the Group with its e-content class) … that’d probably still work.

A microformats-compatible theme will likely wrap the entire note in an div or similar element that has an e-content class applied to it.

This approach will, however, affect how “h-feed” readers and Webmention endpoints “see” the note, as the introductory paragraph is now an integral part of its content.