Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AT URIs as alternate links #172

Merged
merged 3 commits into from
Oct 26, 2024
Merged

Add AT URIs as alternate links #172

merged 3 commits into from
Oct 26, 2024

Conversation

tom-sherman
Copy link
Contributor

@tom-sherman tom-sherman commented Oct 25, 2024

I'm trying to start a convention that allows tooling (eg. crawlers, browsers, extensions) to link the web representation of a record to it's canonical at:// URI. I see no better way to try this than to start doing it in frontpage and atproto browser.

There are multiple representations of the same URI on atproto, due to the authority section being either a handle or a DID. My recommendation is to prefer the DID-based representation, but including the handle is valid also.

Important

The convention I've landed on is <link rel="alternate" href="<AT URI>">. Note: no type attribute because specifying one doesn't really make sense, it's up to whatever tooling that is consuming these URIs to decide how to fetch the record.

In the future we can potentially pickup on these URIs when submitting links to Frontpage to maintain a reference to the record on the protocol.

Some examples of the links in this PR:

Note, the mapping is slightly different between the two apps. For Frontpage I've chosen to always show a DID but on atproto-browser I've preserved the handle where relevant because it matches the intent of the application.

Copy link

vercel bot commented Oct 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unravel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2024 0:16am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
atproto-browser ⬜️ Ignored (Inspect) Visit Preview Oct 26, 2024 0:16am
frontpage ⬜️ Ignored (Inspect) Visit Preview Oct 26, 2024 0:16am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants