RailMate is a Bangladesh Railway companion app. Before asking people to install it, I wanted one place that says what it does, what it only estimates, and what it doesn't do. A README can't carry that, so I built a docs site. This is my Retype docs setup on Vercel: the config, the exact deploy settings, and the mistakes I made along the way. The whole thing took an afternoon.
Why Retype
Retype turns a folder of Markdown files into a static site with a sidebar, search and dark mode, driven by one config file. There is no React, no routing code and no theme to maintain. For product docs, that is the right amount of tooling. You write pages, and the site builds itself.
I looked at heavier options first. A custom Next.js docs app would give me full control, but then I own the navigation, the search, the dark mode and every future bug in them. For a user guide that changes whenever the app ships, I wanted to spend my time writing pages, not maintaining a docs framework.
Project structure
railmate-docs/ ├── docs/ │ ├── index.md │ ├── getting-started.md │ ├── features/ │ │ ├── index.md │ │ └── live-map.md │ ├── limitations.md │ └── static/ ├── retype.yml └── package.json Folders become sidebar groups. Frontmatter controls the label, icon and order. A higher order appears first.
--- label: Getting started icon: rocket order: 900 --- Callouts are plain Markdown too:
!!!warning Estimates, not a live feed Metro positions are calculated from the timetable. !!! Keep one topic per page and keep pages short. A page called "Alerts and alarms" is easy to find, easy to link to from the app, and easy to update when that feature changes.
Configuration
The whole site is driven by one file:
input: ./docs output: .retype url: docs.railmatebd.com branding: title: RailMate Docs label: Guide logo: ./static/logo.png favicon: ./static/favicon.png The url value matters more than it looks. Retype writes it into the canonical tags, the sitemap and robots.txt, so set your final domain before you submit anything to Google.
Install Retype as a dev dependency
Most tutorials tell you to run npm install -g retypeapp. On Vercel, a local dependency is cleaner and reproducible:
{ "scripts": { "start": "retype start", "build": "retype build" }, "devDependencies": { "retypeapp": "^3.0.0" } } Run npm start for a local preview on http://localhost:5000. Add this to .gitignore, because Retype generates all of it:
node_modules/ .retype/ retype.manifest Deploy on Vercel
Import the GitHub repo and set:
| Field | Value |
|---|---|
| Application Preset | Other |
| Root Directory | ./ |
| Install Command | npm install |
| Build Command | npm run build |
| Output Directory | .retype |
Turn on the override toggle for each of the last three fields. With the Other preset, Vercel detects nothing, and a blank field means no output folder.
Every push to main now redeploys the site. My 18-page build finishes in under two seconds locally. For a custom domain, add it under Settings, then Domains, and point a CNAME record at Vercel.
Mistakes I made
1. Asset paths resolve from the input folder, not the repo root. I put static/ at the root and Retype warned that it couldn't find the logo. The attempted path was docs/static/logo.png. Move static/ inside docs/.
2. Committing build output. .retype/ and retype.manifest are generated. Ignore them so your history only contains source.
3. Skipping the override toggles on Vercel. The deploy succeeds and serves nothing useful. Set all three commands explicitly.
4. Forgetting npm install on a fresh clone. Because Retype is a dev dependency, npm run build fails with "retype: not found" until you install. Vercel runs the install step for you, but your own machine won't.
5. Publishing before reviewing the text. A public repo keeps its history. I trimmed some details from the rewards pages after the first push and had to replace the history with a single clean commit. Review the content before the first push, not after.
Write docs that admit limits
The most useful pages are the ones where I wrote down what the app does not do. RailMate shows no seat availability because there is no reliable source for it. Metro positions are timetable estimates and are labelled that way. Fares come from a published chart and are marked unverified.
A Limitations page costs you nothing and earns trust. Users who read it before installing don't leave one-star reviews about things you never promised.
Get the docs indexed
A new docs site only helps once people can find it. Retype generates sitemap.xml.gz and a robots.txt for you. Submit the sitemap in Google Search Console, and if you want new pages picked up faster by other engines, see my post on IndexNow in Next.js for Bing and Yandex.
Result
A fast static site, one config file, deploys on every push, and docs that live next to the code in plain Markdown.
- Docs: docs.railmatebd.com
- Source: github.com/najmulhasandev/railmate-docs
- App: RailMate Bangladesh on Google Play
Originally published at najmulhasan.dev/blog/retype-docs-vercel.
