A dead-simple block theme for WordPress. Supports the โIndieBlocksโ post types.
Live examples:
- https://jan.boddez.net (using a child theme)
- https://ochtendgrijs.be (using a child theme that's really just a tiny bit of custom CSS)
Use blocks, and, optionally, "short-form" post types to more easily "IndieWebify" your WordPress site.
Home Page: https://indieblocks.xyz
License: GNU General Public License v3.0
A dead-simple block theme for WordPress. Supports the โIndieBlocksโ post types.
Live examples:
Add support for category and post type queries.
Try to hook into trashed_post
. Send webmentions for each previous mention, and hope the other end is able to deal with the 404 (I don't really intend to keep track of deleted pages and return 410s or a sort of "tombstone" template ...)
We currently only support h-entry (and focus especially on notes, bookmarks, likes, and reposts). Consider other post types.
The thing is, h-review and h-event probably have more in common (like, an actual title, although likes and bookmarks, too, could have titles) with actual posts than with short-form post types (all of which, except for likes, I call "notes").
The WP CS might be against it, but debugging other people's sites is near impossible without proper logging (which should probably be disabled by default).
These don't get autolinked, apparently.
Hi,
I am trying to disable Notes & Likes, I uncheck the boxes, Save Changes and the boxes are checked again.
I've tried a couple of other checkboxes and seem to be able to enable & disable them.
I am using Version 0.2.0 of the plugin. WordPress 6.0.3 I have quite a few other indieWeb plugins activated.
The only other setting checked in the IndieBlocks plugin is Enable blocks
Cheers
John
Ran into this before, isset()
is not enough. (First time everything will somehow be true
, after that things work as intended.)
Well, this ain't good
Except that there's no repost CPT, of course. At the very least, we should fix this for Micropub posts, where we can corrrectly detect reposts.
Because we stuck with WordPress' class filenames, and have now introduced a "helper" functions.php
file, we're using classmap
and files
directives next to PSR-4 style autoloading for vendor classes.
This means that, after running php-scoper add-prefix
, we need to update build/composer.json
, add ../
in just the right places before running composer dump-autoload --working-dir build
.
Be nice if this could somehow be automated.
Lots of webmention_comments_
prefixes still in the Webmention code, should probably move to indieblocks_webmention_
or something, and not break existing setups.
Since we're including the mf2 library, we could parse posts, theoretically, and store their implicit post "kind" (like, bookmark, etc.). Like, do that each time they're "published" and store the "kind" in a custom field.
We should be able to then use that information to determine if we should autogenerate a title, for instance.
Move to dynamic rendering (or introduce one or several new blocks that are rendered server-side), and fetch linked pages in order to determine their title, author, and whatever other metadata, in order to more meaningfully display reply, etc., "contexts."
Hello @janboddez,
Can you tell me if there are any other required plugins for the IndieBlocks plugin?
And for Mastodon, then can you tell me how to use it and by that I mean, do you just pot a Like with the url of the Mastodon post, for example, and then publish the post? Or do you have to publish the post with some type of sharing?
I have all of the IndieWeb plugins installed except the ones that require the classic editor. In a reply to me on Mastodon a while back it seems like you mentioned that I might need to make an adjustment to something that related to Webmentions.
The reason I am asking is because I did test out the Likes today for a Mastodon post and I can't get it to work.
Thank you for your help!
Michelle
So don't throw out the history before resending.
Either implement Webmention ourselves, and make it work without extra plugins, or ensure integration with the Webmention plugin, also for our CPTs.
Rather that queued?
There's currently no date-based archives for notes and likes (because I don't use them, and a lot of microblogging services don't either). Maybe add them?
I've been avoiding InnerBlocks in favor of block patterns and templates, but if we want to offer even better (as in tuned to a specific post type) and easier-to-use microformats support, InnerBlocks may be the way forward.
Allow custom slugs, like micro
. Also, date-based permalinks.
See #36 (comment)
Our little parser uses transients to cache fetched HTML. The max safe key length is 172. Rather than use mb_substr
, we should probably use just substr
. Or SHA-256 or so (which outputs 64 bits and thus is safe). And accept the (super minimal?) risk of collisions. (Should one ever occur, the title field can be overriden manually, at least when posting from the editor.)
Improve block attribute selectors by using [class^="^u-"]
? In case we add more markup.
Just noticing
indieblocks/includes/class-feeds.php
Line 153 in 7ab647c
Fairly sure this could lead to issues when the block editor is used on that post.
Overwrite/append to default Micropub content (for supported post types).
Additionally, use use_block_editor_for_post_type( $post_type )
or similar to detect Gutenberg support, then immediately add the necessary block markup.
Like, you know, the actual Webmention plugin. Could help familiarize folks with the concept, or invite spam. Or we could show it only for authenticated users, for testing purposes (but then they would have to put a [hidden] post up either way, and could "just" send an actual mention, because if the source page isn't found or otherwise does not actually mention the target page, the mention is immediately gonna get rejected).
Add option to include notes on main blog? Like for RSS?
Need a DB version check in an init
callback instead of on activation only, then run dbDelta()
if needed.
Webmentions are now stored as regular comments and shown more or less like the trackbacks of yore. Except for likes, reposts, etc., where the comment will simply say, "... like this!" or something.
Either way, we should allow "facepiling" likes, much like the standalone Webmention plugin.
Because pressing the button saves the post, i.e., submits the form.
Something like
if ( class_exists( '\\IndieBlocks\\Micropub_Compat' ) ) {
remove_filter( 'micropub_post_content', array( '\\IndieBlocks\\Micropub_Compat', 'set_post_content' ) );
}
but in the form of a proper setting.
Using the Full Site Editor to edit the comment section on my website I'm wondering if there is a good way to be able to separate the links and reshares so they can be stylized differently. I'm not sure about removing them from the other comments, maybe by comment type?
For those that don't wanna mess with theme templates, CSS, or both.
Also inside the editor? In Gutenberg, the title field can be huge. Makes little sense for "titleless" updates.
This may be an artifact of block themes or how they call the query block, but CPTs seem to just pop up in search results and the main blog feed ...
Mark up the core comments block(s).
In blocks.js
.
I think this only an issue in the version on WP.org, i.e., will be automatically solved with the next release.
Should be called $result
Both Post Kinds and IndieWeb CPTs support(ed) Post Formats. Plus, it's easy to add support.
While contemplating update/delete support, it'd be nice to have a button of sorts to be able to retrigger webmentions, like when a post was significantly updated.
(IndieBlocks currently limits the number of webmentions to 1 per post per outgoing link, even if said post is updated afterward. Reason behind this behavior is that not all endpoints support updates; some will just keep adding mentions.)
Currently, some of the options checks ("Is this option enabled") are in the register()
methods, and then there's also checks in some of the actual callbacks.
The latter allows us to call these functions before flushing permalinks, for instance. If the option in question is disabled, no routes will be added or modified, and we're good.
Maybe, for consistency, we should move these into the callbacks themselves.
Notes and Likes now come with (slightly different) block templates.
This is somewhat annoying, because for regular notes, I'd rather start with an empty slate.
We could make the template optional and add block patterns instead.
Like, either replace the comment author URL with the source URL, or leave it as is and instead add the webmention source to the bottom of each comment.
Although accessing our custom API endpoint currently works, we should probably explicitly require 'wp-api-fetch'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.