Uncategorized

So Mastodon 4 went js;dr, which means it requires JavaScript to render content. That means that server-side fetches of Mastodon 4 user profiles and posts, eg indieweb.social/@snarfed, no longer return the actual contents in the response. They definitely no longer include microformats. 😐

JavaScript and SPAs are their own conversation, but regardless, this is a step backward for the open web and server-to-server communications like the IndieWeb uses. Fortunately, there’s a workaround: use granary! Plug any Mastodon 4 profile or post URL into granary’s ActivityStreams 2 converter and you’ll get the full contents in HTML, Atom, RSS, or any other format you want. Works via REST API and pip-installable Python package. Here’s an example. You can even get a user’s feed from their ActivityPub outbox URL, eg for @alice@mas.to, plug `https://mas.to/users/alice/outbox%3Fpage%3Dtrue` into granary.

Happy hacking!

Standard

10 thoughts on “

  1. @snarfed.org As a web developer of over two decades now, I die a little each time another site or app goes client-side JS-only. I say that having written thousands of lines of client-side JS, but with progressive enhancement at their core. In an age where robust frameworks like Hotwire Turbo and similar exist, there really isn’t an excuse.

Leave a Reply

Your email address will not be published. Required fields are marked *