Keystatic article publishing

Connect a GitHub-backed Keystatic collection, review article pull requests and release approved content.

On this page

Connect the right collection

Keystatic publishing is available on Starter, Growth and Pro. In PB, choose your website, open Publishing and select Keystatic.

This connection supports GitHub-backed collections with inline frontmatter and ordinary Markdown/Markdoc content in one .mdoc, .mdx or configured .md file. Your Keystatic collection must use format: { contentField: 'content' }, using the actual content field name. Split metadata/body files, media uploads, custom Markdoc components and executable MDX are outside this version.

Configure repository access and field mapping

Create a dedicated fine-grained GitHub token for the repository with Contents and Pull requests read/write access. Keep the token private.

Enter the repository as owner/repository, the publication branch and a file path such as content/posts/{slug}.mdoc or content/posts/{slug}/index.mdoc. Map the title field and optional date/excerpt fields. Supply other required fields as JSON, for example {"author":"Garden team","tags":["gardening"]}.

Save and check the connection. This checks repository/branch access; review the first generated file against your own Keystatic schema. PB does not automatically infer every collection structure.

Review and release an article

Open an article in PB and approve it. Send for Git review creates a pull request; edits update the same branch. Review that pull request before choosing Release to Git and confirming the release.

The mapped date uses the article creation date, or the scheduled publication date, in UTC. Publication-calendar scheduling runs the same release flow at the chosen time.

GitHub branch protection and required checks still apply. Existing files at the target path and external article-branch edits are not overwritten. After a merge, make further edits in your repository in this first version.

Check your hosting deployment

PB reports Released to Git when GitHub confirms the merge. Your existing host must deploy the publication branch. A Git merge does not prove that the article is live; check the build and published page at your host.

Disconnecting removes PB's stored GitHub access, but does not delete files or pull requests. Revoke the repository token in GitHub separately when needed.

Instructions for your connected site

Open account setup for domain-specific values, diagnostics and copy-ready configuration. These stay private to your workspace.