Show newer

At least they were there 2014–2018. Guess it’s more important building a visual editor that can hopefully one day outcompete Wix’s and Squarespace’s, and merge _that_ into core.

Show thread

Guess I only just learned that Automattic’s Underscores starter theme had them removed some … 4 years ago.

(bddz.be/gXY)

Show thread
Jan Boddez boosted

Quick reminder: WordPress has had (limited) microformats support since just about forever. The new “block” (FSE) themes, like Twenty Twenty-Two, not so much. This is a regression.

> WordPress respects the hAtom microformat. Therefore every post has an `.hentry` class added to it to respect the specification.

themeshaper.com/2014/11/20/mas

(bddz.be/om5)

Somewhat inspired by zylstra.org/blog/2022/09/wordp, I did some experimenting with WordPress’s new Full Site Editor. The result is this, still very hacky, Twenty Twenty-Two child theme. github.com/janboddez/tt2-mf2

(bddz.be/pPN)

… be able to stuff all this in a plugin.

The one big “IndieBlocks” (not actually a name) plugin.

Show thread

The `post_class` and `body_class` filters still work, luckily.

Regardless, my `functions.php` is now 280 LoC, simply because I want to tack on a couple classes here and there.

A block wrapper class filter would be nice. Yes, this may be what block styles are for, I’ll be checking that out later. I’m already glad I got this far.

Potential upside: I used to say microformats were obviously theme territory. But thanks to (core, or theme) blocks, this may no longer be true, and we might actually …

Show thread

I’ve so far added one class to `templates/single.html`; the rest (`p-name`, `h-card`, `dt-published`, etc.) is done in PHP, by completely overriding some of the core blocks’ render callbacks.

Some of this could probably also be accomplished with some extra `div`s in a couple template/HTML files.

Now, quite a few block styles depend on the CSS child combinator and extra markup can seriously screw up page layouts, which is why I’d rather just stick an extra class onto what’s already there.

Show thread

Aargh, must be the Gutenberg plugin's messing with me.

Show thread

Also, it's kind of ridiculous we have to do this and can not simple filter block attributes (which anyhow wouldn't work for post dates, but whatevs).

Like, the post title and post date render functions are easy enough. Post content's a bit harder already. It'd be nice if we could pass on a class from our "HTML" template file, but alas. Even the default `entry-content` is hardcoded in core.

Show thread

Guess I was a bit too enthusiastic there.

I removed the core "register block" actions for post title and date, and added new callbacks with a slightly modified render function.

And it works!

Except, there's also "block has already been registered" notice I can't get rid of except by lowering my callbacks' prio (but then it all stops working).

Yes, the `remove_action`s work (AKA return `true`).

Show thread

The same goes for the post title block; this is good news!

With traditional themes, it’s not possible to add a class using just a hook, and we often have to adjust several templates; with block themes, we just have to call a custom callback function.

Show thread

We’re in luck: the post date block is rendered server-side (of course it is, these dates change all the time). github.com/WordPress/wordpress

Planning to give converting TT2 or TT3 (to include mf2) a try, hopefully this weekend.

Either way, adding microformats2 to *themes* is *incredibly easy*—mf1 are already in nearly every theme!—and WP.org (through the default themes) and Automattic/ThemeShaper *should* take the lead.

Show thread

Rather than implement that last 20%, or 25%, we killed pingbacks and moved our conversations to a single, closed-off site. And created a *huge* moderation problem. The “spam” (trolling, disinformation, and such) is still there, but we ourselves cannot control it (and Twitter can’t either).

Show thread

The real improvement is microformats2 (actual post types, yay!) and the Webmention and Semantic Linkbacks plugins (and the like), so that these site-to-site interactions, which themselves aren’t very new, can be displayed much better/clearer.

Show thread
Show older
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!