Blog

Goodbye GitBook: our Handbook is now built and hosted by us

Diario del capitán, fecha estelar d314.y42/AB

Maxime
Full Stack Engineer
goodbye

If you’ve opened handbook.marsbased.com lately, you probably didn’t notice anything different. That was the idea. The address is the same, the content is the same Markdown in the MarsBased/handbook repo, and old links still work. What changed is the site behind it. GitBook no longer builds or serves the Handbook. We do.

Why we moved

GitBook did its job, but it owned three things we cared about: the rendering, the search and the look. Every time we wanted something slightly different, we were limited by what the platform allowed.

Now the Handbook reuses the website’s styles, fonts and favicons, so it feels like part of MarsBased instead of a generic docs site. It’s also one less third party to depend on, because the whole thing is code we control, living in the same repo as marsbased.com. And there are no vendor limits anymore. Nested sections, search, redirects, or whatever we want to add next is just a pull request away.

How it works

The Handbook is a second, fully static Astro site inside our website repo (perseverance), with its own config and pages under src/handbook.

Before each build, a script downloads a fresh tarball of the Handbook repo’s main branch. A custom loader then renders every Markdown page. SUMMARY.md still drives the sidebar, the ordering and the prev/next links, the same way it did in GitBook. If you indent an entry there, it becomes a collapsible sub-page.

URLs mirror the paths in the repo, so guides/security/README.md becomes /guides/security. The paths GitBook used are redirected automatically, which means old links and bookmarks keep working.

How it deploys

It’s a static site on Render, defined next to the website in render.yaml, published from dist-handbook/ and served at handbook.marsbased.com.

It redeploys on every push to the website repo, which covers layout and code changes, and on every merge to main in the Handbook repo, which covers content. For the second case, a GitHub Actions workflow in the Handbook repo calls a Render Deploy Hook, and Render rebuilds the site, pulls the latest Markdown and publishes it.

The whole thing takes a couple of minutes. If something looks off, you can follow the run in the Actions tab of the Handbook repo or in the Render dashboard.

What it means if you edit the Handbook

Nothing changes. You open a pull request against MarsBased/handbook, keep SUMMARY.md updated when you add a page, and indent entries if you want to nest them. Once it’s merged, you don’t have to do anything else. The change is live within minutes.

You normally don’t need a local preview either. For content changes, GitHub’s Markdown preview on your pull request is enough. A local preview only makes sense if you want to work on the site itself, like a new feature or a layout change. In that case, clone perseverance, run bun run dev:handbook, and point HANDBOOK_DIR at your local Handbook checkout to see your work in progress.

Wrapping up

For readers and editors, the Handbook works exactly like before. The difference is that it’s now ours end to end, so the next improvement doesn’t depend on what a vendor decides to support.

Compartir este post

Artículos relacionados

Handbook AI-Augmented Development

How we actually use AI to build software: what's in the Handbook's AI-Augmented Development page

A few months ago we quietly added a new section to the MarsBased Handbook laying out exactly how we use Claude Code day to day, from research to planning to implementation. We never wrote about it here, so we're fixing that now.

Leer el artículo: How we actually use AI to build software: what's in the Handbook's AI-Augmented Development page
Handbook

Leveling up: The new MarsBased Handbook

The MarsBased Handbook got a major refresh: new design, better search, and faster access to all policies and benefits. Find answers more intuitively than ever.

Leer el artículo: Leveling up: The new MarsBased Handbook
Moving with luggages

How to migrate your post analytics from Ghost(Pro) to self-hosted Ghost

In this blog post, I will show you how to migrate your Ghost(Pro) analytics to a self-hosted instance of Ghost, because the current product doesn't port them.

Leer el artículo: How to migrate your post analytics from Ghost(Pro) to self-hosted Ghost