ActivityPub in Ghost has been in beta for a while, with plans to officially ship to everyone in the summer. I started my own test ghost.io blog to troubleshoot compatibility problems. Until now, Micro.blog and Ghost hadn’t played well together on the fediverse.
Here are some things I found that might be helpful to other ActivityPub implementers:
- Ghost uses
Article
for blog posts, andNote
for short microblog posts and replies. Because everything in Mastodon is a note, I never had anything special for articles before. I’ve now added support for thename
field for blog post titles. - Ghost uses the value
as:Public
for theto
field when creating posts. Mastodon uses the full URLhttps://www.w3.org/ns/activitystreams#Public
. I adjusted Micro.blog to accept both. - Ghost microblog posts (
Note
) do not have a permalink on the web. Theurl
field is not set like it is for article posts. These objects only have anid
, which is a URL to a JSON file. This means in Micro.blog’s timeline, if you click the timestamp you get JSON instead of a web page. Not a good user experience. - Ghost sends
to
andcc
as strings. Micro.blog and Mastodon send those fields as arrays. This doesn’t seem to matter, though. - Ghost appears to ignore the
content
field when receiving a new note. Instead, it fetches the post again over HTTP and then parses that response. To make this work with Micro.blog, I had to change hosted sites to allow HTTP content negotiation on blog post URLs, something I’ve been wanting to support for a while anyway.
All of these changes have made Micro.blog more robust. It also underscores the need for ActivityPub test suites and examples, for developers like me who learn best from looking at real-world JSON.