strand-publish
Operates Strand's Git-based publishing workflow. The content repo is the source of truth; every article change is a commit on a branch and a pull request. Never push to main directly, never force-push, never rewrite published history.
Preconditions (check before publishing)
- The post file lives at
content/posts/<slug>.mdx. - Frontmatter validates against the schema. Run
strand validate <slug>(or the MCPvalidate_posttool). If it fails, fix it with thestrand-content-schemaskill first — do not publish a failing post. - For factual or news content,
sources[]is populated and claims are cited (usestrand-fact-check-cite). - The article has been through the
humanizerpass, and — when the site runs a review gate —strand-review-gatehas logged it aspassorrevisedincontent/review/<branch>.log. Never publish an article the gate markedblockedor never saw.
Workflow
- Set status.
- Going live now →
status: published,publishedAt= now (ISO 8601). - Future date →
status: scheduled,publishedAt= the target datetime. Do not flip it topublished; the scheduled CI run / editor cron does that at the right time. - Still iterating → leave
status: draftand stop here.
- Going live now →
- Branch.
post/<slug>(new) orupdate/<slug>(edit to a live post). One post per branch. - Commit. Stage only the post file and any author/asset files it introduces. Message:
post: <title>orupdate(<slug>): <what changed>. - Open a PR. Title = the article title; body = a 2–3 line summary, the target publish date, and the validation result. Use the MCP
publish_posttool if available (it wraps branch + commit + PR), otherwisegh pr create. - Let CI run. CI re-validates frontmatter, checks internal links, and lints JSON-LD. If CI is red, fix on the same branch — never merge red.
- Merge per repo policy. Auto-merge if the repo enables it; otherwise leave for human review. Merging
maintriggers the build, which regeneratessitemap.xml, JSON-LD,rss.xml,llms.txt, and the.mdendpoints.
Rollback
Reverting a published post = a normal git revert of the merge commit via a new PR. Never delete history. To unpublish without deleting, set noindex: true and status: draft in a follow-up PR.
Hard rules
- PR-only. No direct
mainwrites, no force-push. - Never publish a post that fails
validate. - Never invent a
publishedAtin the past to backdate a brand-new article. Late or backfilled posts publish with the real (current) date. - Asset binaries go through the storage adapter, not committed as large blobs, unless the repo is configured for in-repo assets.