Documentation / Publishing
How do I connect and publish to GitHub?
GitHub is a live publish adapter: TofuBofu writes finished articles as drafts you approve, then publishes them into your own repository. This page covers connecting it, how we verify the connection, and what to do if it does not work the first time. For the full picture of every publish destination, see Integrations.
Connect
Install the TofuBofu app on the one repository your site builds from, then pick the folder your posts live in. Every publish opens a pull request. We never push to your main branch and we never merge.
| Field | What to enter |
|---|---|
| GitHub installation | filled in when you install the app |
| Repository | owner/name |
| Content folder | e.g. content/blog |
Verify
TofuBofu mints a short-lived installation token from the GitHub App and asks GitHub for the repository you named. A green connection means the app can see that repository right now; it does not yet check the content folder, which is confirmed on the first publish.
What the pull request contains
One file, one branch, one pull request. Every publish writes a single .md, .markdown or .mdx file to a new branch named tofubofu/{slug} and opens a pull request against your base branch. Nothing is ever pushed straight to your main branch.
Frontmatter matched to your own newest post. We do not guess a frontmatter shape. The adapter reads the newest existing post in the folder you picked and copies its format, key for key, so the new file looks like something your own template already understood.
FAQ schema, when the file format allows it. For .md and .markdown files, the FAQ JSON-LD is appended as a script block in the body. For .mdx it is not: a raw script block is JSX inside MDX and breaks the build rather than merely dropping the schema, so the pull request body carries the JSON-LD for a developer to place in the layout instead.
Troubleshoot
I am not an organization owner. Can I still connect?
Yes, through the "Link it" door rather than installing the app yourself. Installing a GitHub App on an organization is owner-only; linking authorizes you as a person instead, which any org member can do. Ask an owner to install the app once, then link it yourself.
It says my posts folder is empty.
The newest existing post in the folder you pick is what we copy the frontmatter format from, so an empty folder or unparseable frontmatter leaves nothing to copy. Publish one post by hand first and reconnect.
Will this push to my main branch?
No. Every publish writes one file to a new branch and opens a pull request against your base branch. We never push to your main branch and we never merge; merging is always your click.
The full story of our first GitHub publish, including the field we got wrong →