Sequoia's documentation on inject says:
If you prefer manual control, you can skip this step and configure your SSG to read the
atUrifield from frontmatter instead.
This works for SSGs where atUri can be exposed as a top-level frontmatter field, but it does not work cleanly with Zola.
In Zola, custom frontmatter intended for templates is conventionally placed under [extra], e.g.:
+++
title = "My post"
date = 2025-01-05
[extra]
atUri = "at://did:plc:.../site.standard.document/3mqq6f23k322y"
+++
Zola can then access it as page.extra.atUri.
However, Sequoia's publish/update detection checks post.frontmatter.atUri. The nested [extra].atUri is therefore not recognized as the document's AT URI. When the post's content changes, Sequoia detects the content hash change but sees no atUri and classifies the post as a new document rather than an update.
This results in a new rkey being created for an existing article, producing duplicate site.standard.document records.
For example:
Existing:
at://did:plc:.../site.standard.document/3mqq6f23k322y
After editing:
at://did:plc:.../site.standard.document/3mtrzfxfjqs2v
The update path itself works correctly when atUri is available to Sequoia: updateDocument() correctly uses the existing collection/rkey and putRecord() preserves the rkey.
Expected behavior #
If an SSG stores atUri in [extra], Sequoia should either:
- support a configurable/mapped location for
atUri, or - recognize
rawFrontmatter.extra.atUriwhen determining whether a changed post should be updated.
In particular, the documentation's recommendation to have an SSG read atUri from frontmatter should work with Zola without causing existing documents to be silently duplicated.
Thanks for catching this! Will see if I can make a fix this weekend.