Docs-as-code without the IDE: edit your repository's docs in a browser
· Updated · Sergii Kravtsov · Folio
Docs as code means writing documentation the way developers write software: as plain-text Markdown files in a Git repository, with version history, review and automated publishing. Folio adds the part that is usually missing. People who do not use Git edit the same files in a browser, and each edit becomes an ordinary commit under their own name.
Docs-as-code without an IDE means the documentation stays Markdown in the product's Git repository, and the people who write it edit it in a browser. In Folio you connect the repository, or just its docs folder, as a space; the files become pages, the editor and the AI assistant work on them, and every change goes back to the same repository as an ordinary commit that a developer reads in git log.
This post follows a technical writer through that setup and then explains how the sync with Git works. The limits have their own section, and after it comes what we are building next.
How docs live in a code repository today
Our own documentation is a fair example, because it sits next to the code. The public Folio repository has a README.md in the root and a docs folder with FEATURES.md, INSTALL.md, MCP.md, LIMITATIONS.md and HANDOFF.md, plus a CHANGELOG.md beside them. It is all Markdown, versioned with the code, and it changes the way code changes: an editor, a commit, a review.

That works for developers and is awkward for everyone else. To fix a sentence in MCP.md you need a clone, a branch, a Markdown editor, a preview and a pull request. A technical writer can learn that, but a product manager, a support lead or a new hire usually will not, so what they know about a wrong page stays in their heads and the docs fall behind the code.
The same repository as a Folio space
When you create a space from a Git repository you give Folio the URL, the branch and, optionally, a root path inside the repository. For a code repository the root path is the docs folder, which you can pick from the repository's folder tree. Folio clones the whole repository (a partial clone, so contents are fetched on demand) and shows only that folder. Every Markdown file in it becomes a page, and a README.md becomes the page of its folder when there is no index.md. Source code and other file types are not pages, and Folio neither indexes nor edits them.

Connecting a docs folder leaves its files as they are. Folio keeps its page ids in its own index, not in your front matter, keeps the keys your site generator needs, such as title, sidebar_position and tags, and adds one hidden file, docs/.<slug>.folio. When a page moves, the relative links inside it and the links to it from other pages are rewritten in the same commit. A space admin can also send pasted images to an assets folder next to the docs, linked by a relative path, so they show on GitHub as well.
The writer edits a page in Reading, Live edit or Source mode (plain Markdown), and several people can work in one page at once. Folio writes each edit to the file on disk at once and makes the commit after about 90 seconds of quiet, or immediately on Sync. The author of the commit is the last person who edited in that window, so the history shows Maria Chen and not a service account; the committer is Folio, the message is folio:update, and the push goes to the branch the space follows.

Developers see this with git pull, git log and git blame. Their own commits travel the other way: Folio fetches about every three minutes and on every sync, and an open page picks up the merged text.

Three ways to change a page
A technical writer has three ways to change a page, and all of them use the same rights and end in the same kind of commit. The first is typing in the editor. The second is Folio AI, the assistant in the side panel: in Agent mode, the default, it can create and edit pages in the space, and in Ask mode it only reads, with the write tools removed on the server and not just hidden in the interface. The third is any agent you connect over MCP, such as Claude Code or Cursor, with a personal access token or through OAuth. In the video, Claude Code adds a release entry this way from a terminal. Folio AI calls the very tools an outside agent gets, so neither is weaker.


What they can do is the same, and deliberately modest: search and read pages, create a page under a parent, replace a page's body without overwriting whoever is editing it at that moment, work with whiteboards and data tables, and read a page's history. A request can be as plain as "add a Limitations section to the MCP page". They act with the writer's rights and no more, so a page the writer cannot open stays invisible to them, and the Git commit carries the writer's name.
Folio AI has one extra for a docs space, the .agent folder: ordinary pages that only space admins can edit and that are added to every assistant run in that space. The glossary, the tone and the style guide go there, versioned like the docs. Both kinds of agent are told to change only what was asked, but the page history is the place to check: it lists every revision, and any of them can be restored.
What happens when two people edit the same file
Sync is a merge, never a rebase. Folio commits what is on disk, fetches the remote, merges the remote branch into its own and pushes. Edits in different places combine on their own. When both sides changed the same lines, Folio commits the conflict markers locally, does not push them, marks the space as Conflict and lists the files. The writer fixes the text like any other edit, or presses "Take the version from Git", which makes the space match the remote branch after saving what was there to a folio-backup branch.
A space follows exactly one branch, chosen when it is created, and Folio pushes straight to it without opening pull requests. For review before docs reach main, point the space at a docs branch and merge it as you merge anything else. If a branch is protected against direct pushes, git refuses the push and the space shows git's message as an error.
Access is Folio's own: admin, editor or viewer per space, narrowed per page, and kept in Folio's database and not in Git. A writer therefore needs no GitHub or GitLab account; Folio pushes with the token saved for the space, and the person's name goes into the commit as its author.
Why this fits internal documentation
Internal docs are where docs-as-code usually loses to a wiki, because the people who know a page is wrong are not the people with an IDE: the support lead who answered the same question for the third time, the product manager who changed the flow yesterday, the new hire who got stuck on step four of a runbook. In Folio they fix it in a browser in a minute, while developers keep what made docs-as-code worth choosing: history, diffs, blame and review. The agents read the same pages, so an assistant can answer a new person from them with a link to the source, as in the onboarding setup.
How can people who do not use Git contribute to docs as code?
They edit in the browser and never see Git. A writer, a support lead or a new hire opens the page, changes the text and moves on. Folio saves the edit to the file, commits it under that person's name after about 90 seconds of quiet, and pushes it to the branch the space follows. They need no clone, no branch, no GitHub or GitLab account and no pull request.
What stays for the developers is what made docs-as-code worth choosing: git log, git blame, diffs and revert. What does not exist is a pull-request flow inside Folio. To review changes before they reach main, point the space at a docs branch and merge it the way you merge code. Inside the wiki, comparing two versions of a page shows what changed.
Is there a WYSIWYG Markdown editor that saves to Git?
In Folio, yes. The editor has three modes on one file: Reading, Live edit, where the page looks formatted as you type, and Source, which is plain Markdown. All three write to the same Markdown file in the repository, and several people can edit one page at once. A developer who prefers an IDE edits the same file there and pushes; the wiki picks it up on sync.
Two honest caveats. The Markdown goes a little beyond CommonMark, so status tags, highlights and the page-tree directive may show as plain text in other renderers. And Folio is a wiki with an editor, not a stand-alone Markdown editor: it needs its own server. To publish docs without a static site generator, a space can be shared as a public website, read-only. If your docs are MDX files in a docs-site generator such as Cloudflare's Nimbus, Folio vs. Nimbus shows how a Folio space edits that folder without touching the components.
Where it stops
The full list is in LIMITATIONS.md; these are the ones that matter for docs in a code repository.
- A space over the whole repository writes ids into your files. Without a root path, Folio adds an id to the front matter of every Markdown page that lacks one and a small file named after the space to the repository root, so the first commit touches many files. Connect the docs folder instead and neither happens. Other tools' front matter keys are kept in both cases.
- The Markdown goes a little beyond CommonMark. Status tags, highlights, underline and the page-tree directive are Folio's own, so other renderers may show them as plain text. Callouts use the GitHub alert syntax.
- Pasted images stay in Folio until an admin switches the space. By default an image pasted into a page goes to Folio's asset store and is linked by a Folio address, so it does not show on GitHub or in an IDE preview. With "Store images in the repository" turned on, new images go to the repository; images pasted before that do not move.
- Link rewriting covers ordinary Markdown links only. On a move or rename Folio rewrites standard inline Markdown links and images, but not HTML tags or reference-style links. File names of new pages are Latin only, although the title can be in any language. The commit is not instant either, and Folio needs its own server with PostgreSQL and Redis.
- Agents cannot delete or move pages or change access. There is no MCP tool for that, so it stays in the interface.
- Folio AI runs on a Cursor key, as the onboarding post explains.
Public docs from a Folio space
People outside the team can already read what you share: a link to a page, optionally with its child pages, works without an account. Since Folio 0.2 a whole space can be published as a public, read-only website: on a path of your instance, on a subdomain or on a custom domain, with the same page tree, search inside the space and, if you allow it, page downloads and an Ask Folio AI box for visitors. How it works and where it stops is in the release post. If you need more from it, such as versions of the docs, write to us on GitHub Discussions and tell us what it would have to do for you.
Try it
To run Folio yourself, start with the install guide; connecting a repository is the "From a git repository" tab of the New space dialog. The public demo shows the editor, but Git and the AI assistant are switched off there, so the sync needs your own installation. The code is on GitHub under the MIT license.
Frequently asked questions
What is docs as code?
Docs as code is the practice of keeping documentation as plain-text files, usually Markdown, in the same Git repository as the product, and treating it like code: versions, diffs, review and automated publishing. The benefit is that docs change in the same workflow as the code they describe, so they fall behind less.
Can people who do not use Git contribute to docs as code?
Yes, if they have an editor that hides Git. In Folio they edit a page in the browser, and Folio commits the change to the repository under their name. They need no Git account. Pull-request review is not built in; use a docs branch if you want review before main.
Is there a WYSIWYG Markdown editor that saves to Git?
Folio's editor shows a formatted page while you type (Live edit), with Reading and plain-Markdown Source modes on the same file. Each edit is written to the Markdown file and committed to the space's branch. It is part of the wiki, not a stand-alone editor, and you run it on your own server.
Does Folio replace my static site generator?
Not for a customer-facing docs site with versions. A space can be published as a read-only public website with the same page tree and search, but there is no versioning of the published docs. If your site generator reads the same Markdown files, Folio keeps their front matter keys intact.
Will connecting Folio change the files in my docs folder?
Connecting the docs folder leaves the files as they are: Folio keeps page ids in its own index and adds one hidden file named after the space. A space over the whole repository is different: it writes an id into the front matter of pages that lack one, so connect the docs folder instead.
See it in a running Folio
Open the live demo and click through a real Folio instance, or install it and move one space over. Folio is open source and stores everything in Git.
Related
More from the blog
- Folio 0.4.6: install as an app, read saved documents offline, signed images
- Folio 0.4.4: notifications, review of agent edits, page owners and team skills
- Folio 0.4.3: a calmer interface, redesigned after your feedback
- MCP security for a wiki: OAuth, tokens and page permissions
- LLM wiki for a team: Markdown in Git, readable by agents over MCP
- Obsidian Bases outside Obsidian: open and edit .base files in a browser
- Obsidian MCP: ways to give an AI agent your vault
- Notion vs Obsidian for a team: what each one gives you, and when neither fits
- Mermaid vs PlantUML: which to use for docs in Git
- Groups and single sign-on in an open-source wiki: free, in one MIT edition
- Side-by-side comparison of wiki pages and versions: see what changed
- Publish a Cursor canvas to your team wiki: dashboards that outlive the chat
- Publish a Claude artifact to your team wiki: interactive pages that live in Git
- Make any page a template: custom templates for your Folio space
- Confluence MCP, Notion MCP and a wiki that is its own MCP server
- Export Confluence to Markdown and keep it in Git
- Mermaid diagrams in a team wiki: keep them as code
- See how your team's knowledge connects: graph, Canvas and Bases in Folio 0.4
- Open an Obsidian vault as a team wiki, without changing a file
- New hires ask the wiki, and the wiki learns what it lacks
- Folio boards: built on Excalidraw, made for teams