A manual that is a blog
The documentation of ./blog.sh lives in the repository: eight files in the docs/ directory, some seventy-seven thousand words between them. On GitHub it can be read, but hardly leafed through. One file has over twenty sections, and a link from another one drops you in the middle of a long page that tells you nothing about where you are. Since 13 October the same text has been at manual.blogsh.app as a manual: the chapters in a menu on the left, the contents of the page on the right, the sections numbered. Since 8 November in Czech too. Today it has 78 pages in eleven chapters and describes 1.12.
It is not a documentation generator. It is ./blog.sh, the same engine this site runs on, with another skin and other content.

What is in it
The chapters come in the order the person who runs a site will need them, and at the end the order of whoever wants to know why the engine is the way it is:
| Chapter | Pages | What about |
|---|---|---|
| Getting started | 10 | what you need, quick start, settings, preview, deploying, comments |
| Writing | 7 | writing and publishing, a second language, writing from a phone, slots, attachments |
| The archive | 9 | import and export, reading the archive, trash and versions, checking, On this day |
| Running it | 6 | rebuilding, deploying, cron, backup, troubleshooting |
| Importing | 5 | what an import does, sources, checking the result, how to undo it |
| Skinning | 9 | what a skin is, where it lives, checking it, when it is the wrong tool |
| Localization | 6 | choosing the language, a full localization, a site in several languages |
| Architecture | 13 | the content model, the build, deploying, the terminal, security |
| Decisions | 6 | why content, publishing or configuration are this way and not another |
| Releasing | 3 | what happens before a tag and after it |
| Apps | 3 | iPhone and iPad, Android, Windows and Linux |
Before them stands a "Start here" page, which says where to begin depending on what you are after.
How a blog becomes a manual
The engine did not have to invent anything new. It was enough to call things by other names:
- a page of the manual is a post,
- a chapter is a series, and the order of pages in it is the order of its parts,
- the menu is the list of chapters in
config/site.yml, - the sections of a page are the headings in its text, and the contents on the right are the contents the engine makes by itself from four headings up.
The whole menu of the manual is this:
nav:
- { label: "Start here", url: "/" }
- { label: "Getting started", series: "getting-started" }
- { label: "Writing", series: "writing" }
- { label: "The archive", series: "the-archive" }
# … and eight more chapters
Add one line, series_contents: true, which puts the list of all pages of a chapter on each of them, and the skin minimal-manual. Minimal Manual does the rest: it moves the menu of chapters into the left column, numbers the sections, keeps the contents of the page standing on the right while the text scrolls, and puts a card to the previous and the next page at the foot.
The conversion
The text was not retyped into the manual. A script converted it: every second-level section of docs/ is one page, the sections under it are its numbered sections, and five sections too short to stand alone were joined to a neighbour. The links between files, over three hundred of them, point to a particular page and a particular section, not to the top of a file. That none of them leads nowhere is watched by ./blog.sh check, as on any other site.
The conversion found a bug no blog had shown: a row of a listing that begins with a code block stretched the page to 1446 px. Documentation has plenty of those, a blog hardly any. It is fixed in the base of the Minimal family, for every skin.
What the engine got out of it
Building the manual showed what the engine lacked. A menu could lead to a tag, a page or an address, not to a series. A chapter did not light up on its own pages, so a reader in the middle of one could not tell which one it was. And a list of all pages of a chapter on a page did not exist at all. All of that came in 1.11, and a series is a chapter describes it. The Minimal Manual skin has come with the engine since 1.11, so a manual with chapters can be built without copying somebody else's stylesheet.
One lesson came free. When the manual moved to the skin from the engine in October, it looked like classic for an hour, because browsers held on to the old stylesheet. That is why, since 1.11, every link to a stylesheet carries a fingerprint of its content.
In Czech
On 8 November the manual got a second language, the way any blog gets one: translations live in the same posts, Czech pages have Czech addresses made from Czech titles, and the links between them lead to Czech anchors. The chapters' names are in config/site.cs.yml:
series:
"Getting started": "Začínáme"
"Writing": "Psaní"
"The archive": "Archiv"
Every page is translated, including those added later.
What it means for you
When you are looking for how to do something in ./blog.sh, start at manual.blogsh.app. It is the same text as in docs/, only it can be leafed through, plus a chapter about the apps.
And if you have something with chapters, a course in lessons, a travel diary by days or the documentation of a project of your own, you do not have to leave your blog for it. The manual at manual.blogsh.app is the proof that it works, and its settings are an ordinary config/site.yml.
Comments