A CLI for publishing standard.site documents to ATProto sequoia.pub

sequoia inject can inject a document URI into the wrong index.html when an article slug matches a directory #62

Closed kool.gv.uy
Closed opened by kool.gv.uy

sequoia inject can incorrectly match an article to a parent directory's index.html when the article's slug is the same as that directory.

For example, I have a Zola site with:

content/blog/2024-12-17-blog/index.md

whose frontmatter contains:

slug = "blog"

Zola generates the article at:

public/blog/blog/index.html

There is also a separate section index:

public/blog/index.html

Running:

sequoia inject --dry-run

produces:

Would inject into: blog\index.html

  <link rel="site.standard.document" href="at://did:plc:.../site.standard.document/3mqq6f2hwkk2y">

However, the document actually corresponds to:

blog\blog\index.html

not the section index:

blog\index.html

The injector appears to match the article based on its slug (blog) before considering the full generated path, resulting in the AT URI being injected into the wrong HTML document.

Expected behavior #

sequoia inject should associate a published document with the HTML file corresponding to the post's actual resolved output path, rather than matching solely on a slug/directory basename.

In this example, the URI should be injected into:

public/blog/blog/index.html

and not:

public/blog/index.html

This seems particularly relevant for SSGs such as Zola where section indexes and article paths can legitimately overlap in this way.

Sign up or Sign in to add to the discussion.