How it works
Unlike API-based CMS platforms, CloudCannon has no content API. When you click Publish in ChatFeatured, we:- Convert your article to markdown with YAML front matter matching your site’s schema
- Commit it to your repository (e.g.
content/posts/your-article-slug.md) - CloudCannon detects the commit, syncs, and your site rebuilds
Because articles land as normal files in your repository, your team can still open and edit them in the CloudCannon editor afterward. Edits made in CloudCannon are preserved — republishing from ChatFeatured always reads the file’s latest state before updating it.
Prerequisites
- A CloudCannon site connected to a GitHub repository
- Permission to create a fine-grained personal access token for that repository (or someone on your team who can)
Setup Instructions
Step 1: Create a Fine-Grained GitHub Token
- On GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click “Generate new token”
- Under Repository access, choose “Only select repositories” and pick the repository your CloudCannon site builds from
- Under Permissions → Repository permissions, set Contents to Read and write
- Generate the token and copy it (it starts with
github_pat_)
Step 2: Find Your Branch and Content Path
- Branch: the branch CloudCannon syncs and builds from (often
main) - Content path: the repository folder where your blog posts live — for example
content/postson Hugo sites - Open an existing post file in your repository to confirm the folder and see your front matter format
Step 3: Connect in ChatFeatured
- In ChatFeatured, go to Integrations → CloudCannon
- Enter your GitHub Repository as
owner/repo-name - Enter the Branch and Content Path from Step 2
- Paste your GitHub Access Token from Step 1
- Optionally enter your Site URL (e.g.
https://www.example.com) so ChatFeatured can link to published posts - Click “Connect CloudCannon” — the connection is tested against your repository before saving
Step 4 (Optional): Commit Featured Images to Your Repo
By default, published posts reference featured images by their ChatFeatured CDN URL. If your site expects local images:- Turn on “Commit featured images” in the CloudCannon integration settings
- Enter your Image Folder — the repository folder where images belong (e.g.
static/blog/uploadsfor Hugo)
<folder>/<slug>.<ext>, and references it site-relative in front matter. A leading static/ (Hugo) or public/ (Astro, Next.js, Eleventy) is dropped automatically, so static/blog/uploads produces /blog/uploads/your-slug.jpg.
Publishing Articles
Publish an Article
- In ChatFeatured, click Publish on your article
- ChatFeatured commits the markdown file to your repository with a commit message like
Publish "Your Title" via ChatFeatured - CloudCannon syncs the commit and your site rebuilds — the post is typically live within a minute or two, depending on your build time
Update an Article
Republishing an article commits an update to the same file — even if the article’s slug changed in ChatFeatured, the original file path is reused so your live URL never breaks.Unpublish an Article
Unpublishing in ChatFeatured commits a deletion of the markdown file, and the post comes down from your site on the next build.Schedule an Article
Scheduled articles are committed at the scheduled time, not when you schedule them — nothing appears in your repository until the publish moment arrives. Cancelling or rescheduling in ChatFeatured works as expected. If a scheduled publish fails (for example, the token was revoked), the article returns to review status and the scheduler is notified by email.Front Matter
By default, published posts include this front matter:- description comes from the article’s meta description (or excerpt)
- keywords are the article’s target keywords from ChatFeatured
- date is preserved on republish, so editing an article never changes its visible publish date
categories vs tags, summary vs description, custom keys like _schema). ChatFeatured supports per-site key mapping and static keys so the generated files match your existing posts exactly — contact support with an example post file from your repository and we’ll configure it for your site.
Troubleshooting
'GitHub rejected the token' Error
'GitHub rejected the token' Error
Cause: The token is invalid, expired, or was revokedSolution:
- Generate a new fine-grained token (Step 1) and update it in the integration settings
- Fine-grained tokens have an expiration date — check whether yours lapsed
- Confirm the token was copied completely (it starts with
github_pat_)
'Repository not found' Error
'Repository not found' Error
Cause: Wrong owner/name, or the token isn’t scoped to this repositorySolution:
- Check the repository is entered as
owner/repo-namewith correct spelling - Fine-grained tokens only see the repositories selected when they were created — regenerate the token with the right repository selected
'Branch not found' Error
'Branch not found' Error
Cause: The branch name doesn’t exist in the repositorySolution:
- Check the branch CloudCannon builds from in your CloudCannon site settings
- Branch names are case-sensitive
'The token can read the repository but cannot write to it' Error
'The token can read the repository but cannot write to it' Error
Cause: The token’s Contents permission is read-onlySolution:
- Edit the token on GitHub and set Contents to Read and write, or generate a new one
Article committed but not appearing on the live site
Article committed but not appearing on the live site
Cause: The CloudCannon sync or site build failed, or the post is being filtered by your site generatorSolution:
- Check the commit exists in your repository (the publish status in ChatFeatured links the file path)
- Check your CloudCannon site’s build status and logs for errors
- Hugo hides future-dated posts by default — verify the post’s
dateisn’t in the future - If your site uses a
draftfront matter key, confirm your ChatFeatured front matter mapping sets it correctly
Featured image referencing the ChatFeatured CDN instead of my repo
Featured image referencing the ChatFeatured CDN instead of my repo
Cause: Image committing is off, or the image download failed at publish timeSolution:
- Turn on “Commit featured images” and set the Image Folder in the integration settings
- Image downloads fail soft — republish the article to retry the image commit
Security Notes
Your GitHub token can write files to your site’s repository. Treat it like a password:- Use a fine-grained token scoped to a single repository with only the Contents permission
- Set an expiration date and rotate the token periodically
- If the blog lives in a shared repository with application code, consider moving it to its own repository before connecting
See Also
- Ghost Integration — API-based publishing for Ghost blogs
- Webflow Integration — CMS with rich field mapping
- REST API — Build custom publishing workflows