Setup
Step 1: Give ChatFeatured access to your repository
There are two ways in. The ChatFeatured GitHub App is the default and works for organizations that turn off personal access tokens. A fine-grained token is the alternative. With the GitHub App- Go to Integrations → Git-based CMS and click Connect with GitHub. Sign in to GitHub if it asks.
- Pick the account or organization that owns your site’s repository, choose Only select repositories, and pick the repository.
- Click Install. GitHub sends you back to ChatFeatured with the repository ready to pick.
- On GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens and click Generate new token.
- Under Repository access, choose Only select repositories and pick the repository your site builds from.
- Under Repository permissions, set Contents to Read and write. If you’ll publish via pull request, set Pull requests to Read and write too.
- 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: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 achatfeatured/... branch with a chatfeatured label, and the post goes live when you merge it.
Committing featured images
With Commit featured images off, front matter points to the image where ChatFeatured hosts it. Turn it on and set an Image Folder, such asstatic/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
Once you’re connected, the Front matter card lists the keys each post gets. Article fields without a key there use the defaults below. To match your theme, click Add field, type the key, and pick the article field under Value comes from. Rename a key in its box, or remove it with the trash icon. Changes save as you make them. When you first connect, ChatFeatured reads a few posts from your content folder and sets up a field for each key they use: the article field it matches, a value that’s the same on every post, or a choice set per article. It also sets the URL pattern when your posts’ paths end in their file names and you left it blank. The card says how many fields it set up, so check them before you publish. A choice only lists the values found in those posts, so add any others in its Choices box. To do this again later, for example after adding posts, click Read from your posts, untick anything you don’t want, and click Add.title and heading, add a field for each key and pick the same article field for both.
To put keys inside another key, use a dot. Fields named image.src and image.alt, taking the featured image and its alt text, write:
image before adding image.alt.
To add a key with the same value on every post, such as _schema: default, add a field, choose Same value every time, and type the value. true, false and numbers keep their type, and an empty value writes the key with nothing after it. Choose Set per article instead for a key you fill in on each article under Additional Metadata. For a key that takes one value from a fixed list, such as a topic, set its type to Choice and type the choices separated by commas. Each article then picks one from a menu.
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 a front matter key, such asdraft, takes the Draft flag. Without one, generators like Hugo treat every committed post as live.
date stays the original publish date.
Troubleshooting
GitHub sent your install request to an owner of that account.
GitHub sent your install request to an owner of that account.
Your GitHub account can't push to this repository
Your GitHub account can't push to this repository
To switch repositories, connect with GitHub again
To switch repositories, connect with GitHub again
The ChatFeatured GitHub App can't see this repository. Add it to the App's repository access on GitHub.
The ChatFeatured GitHub App can't see this repository. Add it to the App's repository access on GitHub.
The ChatFeatured GitHub App is no longer installed on this account, or it was suspended.
The ChatFeatured GitHub App is no longer installed on this account, or it was suspended.
GitHub rejected the token. Check that the fine-grained personal access token is valid and not expired.
GitHub rejected the token. Check that the fine-grained personal access token is valid and not expired.
Repository not found. Check the owner/name and make sure the token is scoped to this repository.
Repository not found. Check the owner/name and make sure the token is scoped to this repository.
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.The commit is there but the post isn't on the site
The commit is there but the post isn't on the site
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.
