GitBook

gitbook.comcontributed by Samuele Ongaro

YES

Replaceable in one session with an AI coding agent.

Documentation hosting with an editor anyone can use. Pages are written in the browser or synced from a repository, and readers get navigation, search, versions and a published site under your own domain.

Promptfree, for everyone, and the only version there is
Build me a documentation site that replaces GitBook: Markdown in a git repository on one side, a fast searchable manual on the other.

STACK
- Node 20+, Astro in server mode, or plain Node with a template engine — no client-side framework either way
- Content is Markdown files in a git repository, not rows in a database. The repository is the source of truth and the site is a view of it
- SQLite for the things that are not content: search index, page views, feedback
- Caddy in front for TLS and immutable asset caching

CONTENT AND STRUCTURE
- One folder per section, one .md per page, front matter for title, description, order and hidden
- The sidebar is generated from the folder tree, with order taken from front matter and falling back to alphabetical
- Support MDX-style blocks without MDX: hint boxes, tabs, accordions, and code groups written as fenced blocks with a language of their own, parsed at build
- Cross-references by file path, checked at build: a link to a page that does not exist fails the build rather than shipping a 404
- Images live beside the page that uses them and are resized at build into two widths

VERSIONS AND LANGUAGES
- A version is a git branch or a folder, chosen at build. The switcher rewrites the current path into the other version and falls back to that version's index when the page does not exist there
- Every page carries a canonical link to the latest version, so search engines do not index four copies of the same page
- Translations are a folder per language with the same tree; a missing page falls through to the default language rather than 404

SEARCH, WHICH IS WHAT PEOPLE ACTUALLY USE
- Full-text search over headings and body, built at build time into SQLite FTS5
- Served from the server in one query, no external search service and no API key
- Results show the page title, the heading the match is under, and a snippet with the term highlighted
- Keyboard first: / focuses the box, arrows move, enter opens
- Log searches and the number of results, and show the admin the queries that found nothing — that list is the list of pages to write next

THE READING EXPERIENCE
- Three columns on desktop: navigation, content, on-this-page. One column on a phone, with the navigation behind a button and the page contents at the top
- Code blocks with copy buttons, filename headers, and diff highlighting
- Anchor links on every heading, and the on-this-page marker follows the scroll
- Previous and next at the foot of every page, from the sidebar order
- Print stylesheet that produces a readable PDF through the browser: no navigation, no buttons, URLs written out after links

FEEDBACK AND ANALYTICS
- 'Was this helpful?' with an optional comment, stored locally, never sent anywhere else
- Page views counted server-side with a salted hash, no cookie and no third-party script
- An admin page listing pages by views, by unhelpful votes, and by searches that found nothing

PUBLISHING
- A webhook from the git host rebuilds on push, or a poll every minute if the host cannot call out
- Build is incremental where it can be and never leaves the site half-updated: build into a new directory, then swap
- A preview build per branch at its own address, behind basic auth
- Broken internal links, missing images and empty pages fail the build

THE INTERFACE
- Dark and light, one accent colour, the same typeface for prose and code at different weights
- Never move the content column when the sidebar opens on desktop
- Respect prefers-reduced-motion: no animated page transitions

OPERATIONS
- .env: CONTENT_REPO, CONTENT_BRANCH, DATABASE_PATH, BASE_URL, WEBHOOK_SECRET
- A single command to build and a single command to serve
- Nightly backup of the SQLite side only — the content is already in git, which is the point
- Health endpoint reporting the commit currently served

WHAT MATTERS MOST
Search and the sidebar are the product. A documentation site nobody can search is a PDF with extra steps. Build the Markdown pipeline, the sidebar and the search index first, prove it on a real repository with two hundred pages, and add versions and translations after that.

Give me the repository, an example content folder, the build and serve commands, .env.example, and a README with deploy steps behind Caddy.

What you lose

  • A WYSIWYG editor colleagues who do not use git will actually write in
  • Hosted search across the whole documentation set, tuned and instant
  • Versioned documentation branches with a review flow around them
  • Analytics on which pages readers give up on
  • Hosting, TLS and a docs domain that someone else keeps up

If you would rather not build

  • MkDocs Material — mature, Python-based, excellent search

What it costs

read from their page 15 Aug 2026

PlanBilled monthlyBilled yearlyLast read
—$65/mo—15 Aug 2026

Their pricing page is where these came from. Seeing a different price? Tell us.

The escape hatch

open source · no votes, no paid placement

Docusaurus

$0

Documentation site generator with versioning, search and Markdown pages.

facebook/docusaurusfree · open source

Starlight

$0

Documentation theme for Astro: sidebar, search and dark mode out of the box.

withastro/starlightfree · open source

Why this verdict

our own opinion · changed only by a person

78/100

Verdict yes at 78: static documentation is one of the best-solved problems there is, and at $65 per site per month the arithmetic is not close. The genuine loss is a WYSIWYG editor for non-technical colleagues, which is why this is not in the nineties.

History

tracked since 6 Aug 2026 · nothing is ever overwritten

Interest · last 30 dayspeak 2/day
views01230 Aug4 Sept9 Sept14 Sept19 Sept24 Sept28 Sept
— views— prompt copies none yet— votes none yet

Questions about GitBook

answered from the record above

Is GitBook free?

No — the plan we track is $65 a month. Premium, $65 per site per month billed annually, plus $12 per additional user per month. The per-site charge is the part that surprises people.

Can you replace GitBook by building your own?

YES. Replaceable in one session with an AI coding agent. Replacement score 78 out of 100, build time one session. Read what you lose before you decide.

How much does GitBook cost?

$65 a month on Premium — $780 a year. Recorded 6 Aug 2026.

What do you lose by replacing GitBook?

A WYSIWYG editor colleagues who do not use git will actually write in; Hosted search across the whole documentation set, tuned and instant; Versioned documentation branches with a review flow around them; Analytics on which pages readers give up on; Hosting, TLS and a docs domain that someone else keeps up. If any of those carry weight for you, keep paying.

Is there an open-source alternative to GitBook?

Yes: Docusaurus, Starlight. The prompt on this page is for when you want it your way instead.

Related entries

same category first, most replaced first

All 40 in Notes, docs & writing

Not sending yet

Every week, something stops being worth paying for.

New verdicts, prices that moved, entries added. One email a week. Unsubscribe in one click. Nothing is being sent yet — your address is kept here, and the first issue is the first thing it is used for.

free forever · no tracking pixel · stored here, never passed to anyone

Esc