Skip to main content
The Git-based CMS integration publishes each article as a Markdown file, with front matter, committed to your site’s GitHub repository. It works with CloudCannon, Hugo, Jekyll, Astro, and more. Your CMS picks up the commit and your site rebuilds as usual. Set it up under Integrations → Git-based CMS. Only GitHub repositories are supported.
Every publish rewrites the whole file from the article in ChatFeatured, so edits made in your CMS editor or the repository are lost. Make your edits in ChatFeatured.

Setup

Step 1: Create a fine-grained GitHub token

  1. On GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens and click Generate new token.
  2. Under Repository access, choose Only select repositories and pick the repository your site builds from.
  3. Under Repository permissions, set Contents to Read and write. If you’ll publish via pull request, set Pull requests to Read and write too.
  4. Generate the token and copy it. Note its expiry date: publishing stops when the token lapses.

Step 2: Connect in ChatFeatured

Open an existing post in your repository to see its branch, folder, extension and front matter keys. Then go to Integrations → Git-based CMS and fill in: Optionally set up the three options below, then click Connect repository. ChatFeatured checks the token, repository and branch before saving. To change settings later, edit the form and click Update Connection.

Publishing via pull request

By default, ChatFeatured commits straight to your branch. Turn on Publish via pull request if the branch is protected or you want to review posts first. Each publish then opens a pull request from a chatfeatured/... branch, and the post goes live when you merge it. With Commit featured images off, front matter points to the image where ChatFeatured hosts it. Turn it on and set an Image Folder, such as static/blog/uploads, to commit each featured image into your repository. Front matter then uses a site-relative path like /blog/uploads/<slug>.jpg.

Front matter (advanced)

Open Front matter (advanced) to match your theme’s keys. Leave a key blank to use the default: Under Static keys, click Add key to add keys that go into every post, such as _schema: default. A default file looks like this:

Publish an article

In the article editor, click Publish or Schedule and choose the Git-based CMS. The dialog has Publish Status, Author (optional), Tags and, for Schedule, a date, time and timezone. Save as Draft only appears once you’ve set a Draft flag key, such as draft. Without one, generators like Hugo treat every committed post as live. To change a published article, choose Unpublish from its menu in the Articles list, edit it, then publish again. The date stays the original publish date.

Troubleshooting

The token expired, was revoked, or wasn’t copied in full. Generate a new one (Step 1), paste it into GitHub Access Token, and click Update Connection.
Enter the repository as owner/repo-name. Fine-grained tokens only see the repositories picked when they were created, so you may need a new token with the right repository selected.
Find the via ChatFeatured commit in your repository’s history, then check your CMS’s sync and build logs. Hugo hides future-dated posts by default, so check the date, and the draft key if you use one.

All integrations

Every CMS and analytics integration ChatFeatured supports.

Articles

How articles move from idea to published.