AT Protocol standard.site
Wednesday, 17 June 2026 - ⧖ 3 minMarmite natively supports publishing your blog posts using the decentralized AT Protocol and the standard.site lexicons. This enables your posts to be discovered, read, and interacted with (e.g., inside the Bluesky) across the decentralized web while keeping your Marmite site as the canonical source.
Setup & Configuration
To enable the AT Protocol features, add the atproto configuration block to your marmite.yaml:
name : "My Blog"
url : "https://myblog.com"
atproto :
handle : "myhandle.bsky.social"
publication_uri : "at://did:plc:.../site.standard.publication/..."
publish_content : true
| Name | Required | Description |
|---|---|---|
handle |
Yes | Your AT Protocol handle (e.g. yourname.bsky.social or a custom domain handle) |
publication_uri |
Yes | The AT-URI of your publication. You should register this publication externally (e.g., using a client like standard.horse, std-pub, or the goat CLI) |
publish_content |
No | If true, Marmite will strip HTML tags from your compiled markdown and publish the post body text up to 10,000 characters as textContent to the AT Protocol record (defaults to true) |
Authentication
Before publishing, you must authenticate Marmite with your PDS.
First, ensure atproto.handle is configured in your marmite.yaml.
Next, create an App Password for your account (e.g., in Bluesky go to Settings, App Passwords).
Export the password in your environment:
export ATPROTO_APP_PASSWORD ="xxxx-xxxx-xxxx-xxxx"
Finally, run the authentication subcommand pointing to your site's directory:
marmite < site_folder> atproto auth
Custom PDS / Self-Hosting (Optional)
If you are self-hosting your PDS or if the automatic endpoint resolution fails, you can explicitly override the PDS endpoint using the ATPROTO_PDS_URL environment variable before authenticating:
export ATPROTO_PDS_URL ="https://my-custom-pds.com"
Marmite will:
- Perform a decentralized DNS/HTTP lookup to resolve your handle to its Decentralized Identifier (DID).
- Query
plc.directoryto resolve your DID to your actual PDS endpoint. - Acquire an authentication session from your PDS and save the credentials locally at
~/.config/marmite/credentials.json.
Local Site Build & Verification
When you compile your site using marmite build or run the dev server with marmite serve, Marmite automatically takes care of domain-level and page-level standard.site verification:
Automatic .well-known Generation
Marmite generates a verification file at:
/.well-known/site.standard.publication in your output directory.
This file contains your publication_uri. Indexers and clients check this file on your domain to verify that you indeed own the AT Protocol publication record.
Automatic Header Injection
For the homepage and pages, the default templates automatically inject the publication discovery link:
< link rel ="site.standard.publication " href ="at://did:plc:.../site.standard.publication/... ">
For posts, Marmite reads the state mapping from your published records and automatically injects the document link into the header of each post:
< link rel ="site.standard.document " href ="at://did:plc:.../site.standard.document/... ">
Publishing Posts (publish)
To publish your posts to your PDS, run:
marmite < site_folder> atproto publish
Also, check --help for more options.
That command:
- Gathers all valid markdown posts (excluding drafts).
- Computes a content hash of each post to detect modifications.
- Authenticates with your PDS (using the saved PDS URL or overridden via the
ATPROTO_PDS_URLenvironment variable). - Performs
createRecord(for new posts) orputRecord(for modified posts) under thesite.standard.documentcollection in your repository. - Saves the mapping of post slugs to AT-URIs inside
.marmite-atproto-state.json.
Subsequent site marmite build read this local state file and automatically inject the document AT-URIs into the compiled HTML heads.
Customizing Templates (Advanced)
If you are using a custom theme and want to manually inject standard.site tags, add the following to your HTML heads:
Base layout (base.html or similar):
{% if site.atproto and site.atproto.publication_uri %}
< link rel ="site.standard.publication " href ="{{ site.atproto.publication_uri }} ">
{% endif %}
Content layout (content.html or similar):
{% if content.at_uri %}
< link rel ="site.standard.document " href ="{{ content.at_uri }} ">
{% endif %}
Please consider giving a ☆ on Marmite Github repository, that helps a lot!