Skip to content
Publishing channels · GitHub

Publish to your Git-backed site

Best for sites built from a repo — Astro, Hugo, Next.js, Jekyll, Gatsby, Eleventy, Docusaurus. CiteAgentic commits each approved piece as a Markdown file; your existing deploy pipeline takes it live.

Use this when your website is generated from a repository. For a hosted CMS, use WordPress or Wix instead.

How it works

CiteAgentic commits your content as content/<slug>.md (the slug is generated automatically from the title) with title + date frontmatter. Because your site already builds from that repo, the commit triggers your host (Vercel, Netlify, Cloudflare Pages, GitHub Pages, …) to rebuild and deploy — so the post goes live with no extra step. CiteAgentic doesn't host your site; it pushes to the repo your site already deploys from.

What you'll need

  • A GitHub repository that your website builds from.
  • A personal access token with Contents: read & write on that repo.

Step 1 — Create a personal access token

We recommend a fine-grained token, scoped to just the one repo:

  1. In GitHub, click your avatar → Settings → Developer settings → Personal access tokens → Fine-grained tokens. (Direct link: https://github.com/settings/personal-access-tokens/new.)
  2. Give it a name and expiration, and set Resource owner to the account/org that owns the repo.
  3. Under Repository access, choose Only select repositories and pick your content repo.
  4. Under Permissions → Repository permissions, set Contents → Read and write (Metadata: Read is added automatically).
  5. Click Generate token and copy it — it starts with github_pat_… and is shown once.

A classic token works too (https://github.com/settings/tokens/new → check the repo scope), but it grants access to all your repos, so the fine-grained token above is safer.

Step 2 — Connect it in CiteAgentic

  1. Open Site Settings → Publishing channels.
  2. Click + GitHub and fill in:
    • Repositoryowner/repo
    • Branch — optional; defaults to the repo's default branch
    • Folder path — where Markdown files are committed. Defaults to content/. Point it at your generator's content directory (examples below).
    • Personal access token — the one you just created
  3. Click Test & connect.

Folder path by generator

GeneratorTypical folder path
Hugocontent/posts/
Astro (content collections)src/content/blog/
Jekyll_posts/
Next.js / Eleventycontent/ or posts/

Publishing

  • On demand: Share ▾ → Publish to your repo on any approved draft.
  • Automatic: link the GitHub channel to a day in the content calendar and it commits on that date — your host deploys it the rest of the way.
How is the filename / slug chosen?
The slug is derived from the title (lowercased, hyphenated), so the file is content/<slug>.md. No manual naming needed.
Does committing make it live?
It goes live through your site's existing deploy pipeline. If your repo is connected to Vercel/Netlify/Cloudflare/GitHub Pages, the commit triggers a rebuild automatically.
Fine-grained or classic token?
Either works. Fine-grained scoped to one repo with Contents: read & write is the most secure. Classic needs the repo scope but grants broader access.
What if the folder doesn't exist yet?
GitHub creates it on the first commit. Just make sure the path matches where your generator reads content.

Ready to connect?

Site Settings → Publishing channels → + GitHub. Add your repo, content folder, and a Contents:read-write token.