wordpress-activitypub icon indicating copy to clipboard operation
wordpress-activitypub copied to clipboard

Feature Request: `<link rel="alternate" type="application/activity+json">`

Open saschanaz opened this issue 2 years ago • 4 comments

What

Consider adding the link rel=alternate element as you can see in Mastodon/Misskey, e.g. in https://fosstodon.org/@krosylight:

<link href='https://fosstodon.org/@krosylight.rss' rel='alternate' type='application/rss+xml'>
<link href='https://fosstodon.org/users/krosylight' rel='alternate' type='application/activity+json'>

Why

This element advertises that the page can be read in ActivityPub form too. Browser extensions can detect it and reopen it on Mastodon for example.

How

No response

saschanaz avatar Dec 31 '23 00:12 saschanaz

I thought about that a lot and wanted to write a FEP to use rel-alternate as alternative to content negotiation!

My issue with the current implementations is that it still needs conneg, but I would expect that it should work similar to the RSS link header (you referenced) instead. That means that it should return Activity-JSON by default, regardless of the Accept header.

From the HTML spec:

If the alternate keyword is used with the type attribute, it indicates that the referenced document is a reformulation of the current document in the specified format.

So it should be more like

<link href='https://fosstodon.org/@krosylight.json' rel='alternate' type='application/activity+json'>

instead!

pfefferle avatar Dec 31 '23 07:12 pfefferle

See https://github.com/mastodon/mastodon/issues/22306

pfefferle avatar Dec 31 '23 08:12 pfefferle

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 30 '24 01:04 github-actions[bot]

Have you written an RFP? 👀

saschanaz avatar Apr 30 '24 06:04 saschanaz