The GitHub connector
Connect a repository without running anything on your site.
1. How it works
Tabularia is registered as a GitHub App. A writer connects a repository by installing that app on it, through GitHub's own install page, and from then on Tabularia reads the article files and commits the writer's revisions itself. Nothing runs on your site. Your existing build turns the commits into pages, as it does for anyone else's.
Inside Tabularia, the repository is one more article store, so publishing to it takes the same durable path as publishing to a site running the connector package.
2. The permissions it asks for
| Permission | Access | Why |
|---|---|---|
| Repository contents | Read and write | To read article files and commit the writer's revisions. |
| Metadata | Read | Required by GitHub for every app. It lists the repositories the install covers. |
The install asks the writer to authorize the app as well. That lets Tabularia confirm, when GitHub sends the writer back, that the installation belongs to the person who started it. The app's keys stay with Tabularia.
3. How it finds the writing
When the repository has a tabularia.json, Tabularia uses it and detects
nothing. Otherwise it reads the repository tree in a single request and suggests folders
in this order.
-
A content folder that the site framework's own configuration points to. These
frameworks are recognized:
- Astro
- Hugo
- Jekyll
- Eleventy
- MkDocs
- Docusaurus
- Any folder holding many Markdown, MDX, or HTML files that share front-matter keys.
It then reads a few of the files to propose which front-matter keys hold the title, the
date, and the page address. The writer confirms or corrects the guess, and
Tabularia commits the result as tabularia.json. Commit that file
yourself and the writer is never asked. The tabularia.json
reference lists its fields.
4. What the writer can edit
The Markdown reader makes ordinary paragraphs, headings, and list items editable. Anything else, an MDX component or a block of raw HTML for instance, stays in the article as a protected Block. Every byte outside an edit is written back exactly as it was, so the diff of a commit shows only the writer's change.
Some sites write their articles in HTML, either as .html files or as Markdown
files whose body is HTML under the front matter. Set format to
html for those, and detection does it for you when most of a folder's sampled
bodies are tags. Paragraphs, headings, list items, and captions are editable when their
words use only bold, italic, underline, strikethrough, line breaks, and links with nothing
but an absolute href. An edit rewrites the words between that element's tags
and leaves quotation marks as they are. Quotations, pictures, embedded frames, tables, and
any element with other markup are protected Blocks, and wrappers such as
<section> and <figure> are never touched.
5. Conditional commits
A file's revision is its Git blob SHA. Each write is a commit conditional on the SHA Tabularia last read, so if someone pushed a change to that file in the meantime GitHub refuses it, and Tabularia reads the new version and merges the writer's changes in before committing again. Pushes to other files never interfere.
New articles are different. Each is created at a path that must not already exist, and if something is already there, the commit is refused rather than overwriting it.