Technical documentation is so much more than just a bunch of text characters formed to some words, if you want to do it right.
You need tools for this, that help you throughout the whole process. As always you want to automate those tasks as much as possible. So, first, what is the whole process? It’s not about just writing the content. It needs to be distributed to the reader, meaning its format must be converted, so the user’s device can cope with the document - and that might take a lot of steps.
Before delving deeper into this, let’s start with the first thing to get right, before even writing the first word of text. The intended audience of your documentation already tells a lot about the requirements.
With the exception of presentations, all of the above are usually tied to a version of your software. So, if you want to ensure, documentation is updated, when developing a new feature, make sure documentation and software live in the same branch, so everything is in sync, when you do a new release.
The first longer document I wrote, was the Securing Debian HOWTO (wow, 16 years ago, crazy how time flies by) which was written in SGML. This was horrible. There are alternatives today, good ones even. So let’s focus, on what possibly is most productive, for the person writing the documentation.
I will merely cover the formats I have the best experiences with, and that is markdown and asciidoc.
Markdown is a very simple markup language. It is producing HTML by default and has a very limited set of instructions, that are continuously extended by some implementations. A common example is syntax highlighting by specifying the language the code snippet has been written in.
The strength of markdown - its simplicity - is also the strongest weakness. While it is nice for a blog post like this, a real technical blog post needs more power. Like annotations/markers in code samples or math formula support, which some implementations support, or support for writing books in markdown by using multimarkdown (adding ToC, glossary, index, etc.). Also support for simple diagrams has been added using mermaid.
With all those tools added up to the tool chain, things are about to get more complex again. Also converting into other formats than HTML used to be a problem, but publishing tools like leanpub or gitbook or the swiss-army knife pandoc help with that.
The right mix between complexity but the ability to still have a pretty simple format is Asciidoc. The greatest strength is the possibility to convert into a ton of different formats like PDF, SGML or HTML, making it really cross platform capable. At least one of the big publishers has been using Asciidoc for some time. It basically has any feature that markdown has, but is an especially nice fit for books, as you can have special blocks (like a warning or an out-of-context information), you can have numbers inside of code samples to refer to them. Also ToC, glossary and listings (and all the other things needed for books) are included.
Obviously these are not the only formatting languages. If you have ever used the older static site generators like jekyll and octopress, you will have stumbled across textile, which has some similarities to markdown. Another candidate there is restructured text, which has been used in the python space. Along with jade and mustache all of them are preprocessors and thus similar to markdown and merely a matter of taste.
The biggest exception in this space obviously is LaTeX, a high quality type setting system. I wrote my diploma thesis with this, mainly because it produces wonderful PDFs, including a nice ToC, glossary, lists of references, tables, images and bibtex. However producing the output is very tedious (you need to know tex packages even for customizing the font), you may have to run it several times and so forth. I also used it for my CVs, even though I would switch to HTML nowadays I think. Same with presentations, I love the beamer package and the resulting presentations, but it takes a lot of work.
There are endless possibilities of writing technical documentation. Either you use a generic editor, or specialized applications. I will just introduce a couple tools I have used so far. If you have other interesting tools, drop me a mail to add them.
At some point in time Mou seemed not really to be developed further (even though it seems to be again), so I tried out LightPaper. It even supports a nice theme to convert to PDFs.
Both are easy and simple editors to get up and running with. You can install both via cask on osx.
Haroopad the next generation editor for markdown. It has more features than simply producing HTML output. Those features include
I really like haroopad, but it is not yet stable and the presentation mode does not render mermaid or diagram outputs. As soon as this works I am really looking forward and I will try it out for presentations. You can also install it using cask.
Even though haroopad starts to fill a gap, I don’t think it is a software I would use for writing a blog post.
This is a very interesting new tool for writing technical documentation. Based JavaFX, Spring Boot, Nashorn and Asciidoctor.js it is an editor, that supports not only writing Asciidoc but also allows you to write books, including
Atom is one of the new kids on the block. One of the nice features is its possibility to write plugins and easily install them. The Asciidoc plugin has a neat preview functionality. Even though I would not start up Atom for writing pure technical documentation, it is nice to have built-in plugins for better documentation, in the same editor used for programming.
This chapter is more about the infrastructure to write books or complete documentation instead of short texts (with the exception of static site generators, which can basically be used for anything).
gitbook is a command-line node.js tool, that helps you creating nice looking books. It supports markdown and asciidoc (even though asciidoc feels somewhat limited right now and a second class citizen, I could not get even syntax highlighting support to work with asciidoc).
It is really easy to get up and running
npm -g install gitbook gitbook init gitbook serve gitbook build gitbook pdf gitbook mobi gitbook epub
Most notably you need to have calibre installed to create ebooks. I really like the produced HTML of gitbook, as it looks nice.
gitbook also supports plugins, like support for mathjax, comments, disqus and many more, see the plugins page.
If the asciidoc support improves, this is a strong candidate for future usage.
git-scribe is a small set of tools on top of the git command, that makes it simpler to write technical documentation. To get up and running and see a sample book simply do this:
gem install git-scribe # Check if all needed parts are installed git scribe check git scribe init testbook cd testbook git scribe gen all
The different formats look pretty nice, the HTML is not awesome, but sufficient for technical docs and you can tweak it. Also, by using kindlegen it produces nice
One thing: The last commit is from early last year, so not sure how actively this is maintained.
Now to one of my favourite tools: static site generators. I think the time of dynamic platforms like drupal or wordpress for small sites or weblogs is over. Just create all the content upfront and let it serve by an nginx or apache web server. Technical documentation/blog posts are both a perfect fit for static site generators. You can have it easily embedded in your website and have a neat design, while being able to generate documentation easily.
One of the great things about static site generators is, that there are so many of them. You can check sites like static site generators or StaticGen to get an overview about the hundreds of static site generators, dozens for any language.
Harp is a node.js based static site generator, that allows you to easily create a static sites. Installation is pretty quick
npm -g install harp harp init static-project harp server static-project
harp supports markdown, jade, ejs, coffeescript, sass, less. When you want to run create HTML sites, you can simply run
harp compile and copy the created content over to a website. I use harp for this blog as well as for the devcampmuc website as it makes my life much simpler. If I wanted to write huge technical blog posts or very exhaustive, but still nice looking docs, harp would be my first choice. On top of that the harp developers create surge allowing you to push your content to CDNs, for free (see the github repo).
The only missing part of harp is support for asciidoc. Unfortunately the library used for preprocessing is not really extensible with external modules and the authors do not have to seem any intent of making it like that in order to get rid of the dozens of pull requests to support any preprocessor. Once this and live reload support is added in core, harp is going to be completely awesome. I also did a presentation on harp a couple of months ago, in case you are curious.
Another interesting project to fill the asciidoc gap is hubpress. The approach is to clone the hubpress github repo and then use the browser to push data to that newly created repository, so no local installation of anything is needed. The whole idea and concepts behind that look really need, takes you 10 minutes to get up and running.
These are just a couple of other helpers I found, that you may find useful. I cant comment too much on them due to the lack of experience.
If you want to produce a professional book in order to sell it, publishing is the last step. You need to think a lot about, if you want to have the professional editing of a book, but not make a lot of money out of it, or if you prefer to use a very lean publishing platform and decide about the price by yourself. Whatever you do, make sure some other technical experts take a deep look at your book, before you publish it. If possible, make sure, that the other people are native speakers, this makes a big difference for any techbook.
These are a just a couple of platforms I came across, while writing this blog post. I do not have any particular preference or experience with either of them as a book author, so take this with a grain of salt.
One of the well known lean publishing platforms on the web. I already bought a fair share of books and I love the fact that the buyer can set the price him/herself (given a certain range from the author). As far as I know most of their platform supports markdown, or more specifically markua. Leanpub does not create ISBNs for their books, so you cannot sell your books via other ebook platforms, like amazon. But that’s where platforms like lulu come into play, which is also recommended by leanpub. They also create real paperbacks of your ebook, so make sure it looks nice, in addition of selling them via the ebook platforms.
Gitbook is not only providing a nice tool chain of writing books, but also takes care of publishing it, creating ISBNs and simplifying the boring tasks like accounting and taxing, even though this seems to be tailored to the US market for now.
Obviously, if you are into tech books, there are a couple of well known publishers, that you could ask, if they are interested in the topic you write about. Also I know about several books, that started on lean publishing platforms but then bigger publishers asked if they can actually publish that book, which is a pretty nice accomplishment.
Among the more known tech publishers are companies like O’Reilly, Manning, Pragmatic Bookshelf, Carl Hanser, dpunkt, Addison-Wesley, Apress, Galileo, Wiley, Packt, Entwickler.press - and for sure tons of others.
One of the things all of the above platforms were missing, was the collaboration part. If you got an editor persuaded to take a look at your book, you don’t want him to use gitbook and run everything locally, you just want that editor to fix your stupid mistakes and annotate the corresponding text instead of creating pull requests or whatever. An interesting platform for this seems to be Penflip. Whoever integrates with such a platform, will win this battle - and I hope it happens soon.
The last part of technical documentations are presentations. At some point in time you usually stop showing some boring documentation, but you need people to use your product and motivate them to read docs. This is what presentations are good for, either by kind of evangelizing your product or by showing off some certain features.
Again there a tons of different approaches for presentations. I really like the approach of latex beamer, which I used a lot in the past (like here), but at the end it just takes too much time, if you want to create presentations in a timely manner.
This usually brings us back to the good old desktop presentation tools like keynote, powerpoint and impress. While I do not like this for deeply technical presentations (no syntax highlighting out of the box, lots of font/size changes needed, typography usually sucks because of too many options for people, the average slide template is ugly), I usually use this, because my design and CSS skills prevent me from doing web based presentations that resemble my company’s corporate identity.
For web-based presentations there are really nice tools like reveal.js, deckjs or shower. I used reveal.js as well as shower already and I really like them. I try to become a better member of the web in the future and create more presentations with this. This also makes sharing with existing documentation and cross-referencing so much easier. The good news is, some platforms don’t forget about presentations, so AsciidocFX will soon have support for presentations. The same applies to haroopad’s presentation mode, which just needs some more time I guess.
One of the biggest problems with web based presentation is the creation diagrams. Luckily things like mermaid started to solve this problem, but there are several image generators on the web, that allow for nice images, for example yuml, which produces neat images like this one:
Last but not least, there seems to be one commercial desktop app, that uses markdown and solves one of the biggest problems of desktop based presentations: lack of themes. Deckset tries to help here. Also it claims it has nice PDF support, which is obviously very important as well for any web based presentation toolkit.
As you can see, technical documentation is quite a topic, if you view it from different angles. Most importantly, make sure, you stay somewhat consistent and make it easy for everyone to constantly edit and improve the documentation, otherwise it will just become an unmaintained outdated pile of bytes (see, like source code).
Personally even though asciidoc is the superior format, I still like markdown a lot, because the tooling around it seems to develop much faster. But I really hope, that both are here to stay.
That said, if there are more awesome tools, or I completely wrote wrong things, please drop me a note or ping me on twitter and I will update this page.