AsciiDoctor and moving to GitLab
A lot of my current projects require writing technical documentation, and it made me think quite carefully about the best practices here. I’ve found out that there are few principles which make me the most effective.
-
Documentation as Code is the most important one. It has the advantages like:
-
The source of documentation could be version controlled with the well-known and mature VCS like Git;
-
New changes could be pre-approved before submitting (e.g. as pull requests);
-
Proper VCS could give quite rich functionality (e.g.
git blame
to find the author of the changes and the reason for them).
-
-
Text Includes is another important principle as it allows to:
-
Re-use the documentation fragments (e.g. headers/footers);
-
Include live code snippets (copy-pasted snippets could easily get out of sync).
-
-
Rich Formatting is a must-have for the user-friendly documentation:
-
Automatically generated ToC;
-
Offline syntax highlight of the source code. It allows to include properly formatted code into the generated documents (PDF, HTML etc);
-
Tables with headers, alignments and merged cells.
-
Not all markup systems could satisfy those principles (like wide-spread Markdown), therefore I’ve decided to use Asciidoctor (also know as AsciiDoc). I use it for few months already, and could confirm that it is quite mature and reliable format to use.
However, I’ve discovered that not all systems properly support it. In particular, I’d like to refer this GitHub issue: Asciidoctor: support include directives for other asciidoc files. It’s already 3 years old, got a significant number of follow-ups, but looks like it’ll be never addressed (as some core developers left the team after GitHub has been acquired by Microsoft).
And that makes me start the process of leaving GitHub, and switching to GitLab - feature-wise the latter is much more superioir to former (at least, the features I consider important like proper Asciidoctor support). Surely, GitHub has polished UI and huge community, but as a software developer I’m looking into other areas, not design and social communications. The moving process is gradual and ad-hoc - I’m going to move the project only I need to introduce some changes in it (and luckily, GitLab has the nice feature of exporting from other systems including GitHub).
I’d highly recommend to check out AsciiDoc, its quick reference gives the nice overview of its capabilities. And if you decide to use AsciiDoc for your internal projects, I’d like to recommend GitLab too (and even if you don’t use AsciiDoc, GitLab has the quite extensive feature list you may like).
Comments
Post a Comment