Docs as Code at Linode (2020)
linode.com
linode.com
We currently try to establish something similar on our end using AsciiDoc [1] as fileformat, Antora [2] to build the site and hosting on Azure storage. AsciiDoc has a bit more features compared to Markdown which allows for a richer presentation of the docs.
Biggest difference is that Linode has the docs in a separate repository. Not sure if it is a limitation of their toolchain or a deliberate decision.
Antora allows you to have the project documentation in the actual project repositories. It then pulls the docs from all the different repos together to build the site. This also allows you to have the released product versions go in-synch with the docs versions. Antora builds each version of the product as part of one site. The reader can explore different product versions or navigate between pages across versions.
===
I need to find an excuse to use it again.
This is just plain old static site generation?
By "docs as code" I expected something like programmatically verifying that the code examples compile, maybe even spinning up VMs and testing that the example commands lead to the expected output.
For me, actual "docs as code" would be more like CUE (https://cuelang.org/) - a language with which you can write definitions for e.g. an API, and then use this code to generate docs and validate your API output against.
This is the key. Someone has ownership over the docs. This is their job. If you expect programmers to invest into good docs, you need to measure them on it. Otherwise, you are hoping they write good docs. If you don't value the docs they write, they probably won't spend time on it. Like most people, they will put effort into what gets measured at performance review time.
The fact that you store something in a VCS, that you pipe it through some "lint, test, deploy" pipeline doesn't make it "code".
Nowadays they call anything "code" just because you do VCS + pipeline. Most of the time it is (complex) configuration text files (like cloudformation and terraform) or some sort of documentation (like markdown).
When you can implement a generic Touring machine with whatever you call "code", then you can really call it "code", IMHO.
I use to say to my students (with a large amount of semplification), if you can implement a sorting algorithm with that, then it's code. Otherwise it is not.
The point of "docs-as-code" is not "code that produce docs", but "docs treated as code", that is, versioned in a VCS and built using similar workflows as the code they document. It's also a way of bringing technical writers and developers together and collaborate more.
[0] Maybe barring the tech writers who are still stuck using FrameMaker and the like.
Debating on the use of the words is wasted energy. Imo, what matters the most are the concepts behind them. The same can be said about the many discussions about server-less architecture.
What you described is docs _in_ code. The title is docs _as_ code, which means exactly as what the article describes, treating it as if it is code in pursuit of maintainability.
Of course you can start calling your mouse "a cat", your car "a mobility device" and yourself a genius. But reality won't easily follow.
CLOCK?!
I feel sad for your students (if you really have any) for having such obtuse teacher.
Using version control software
Writing plain-text documentation files
Running automated tests
Practicing continuous integration and continuous delivery
To me this is version controlled and tested docs. There's little code to it from what I can see. Docs as code is like in Go where you annotate a function and it's documentation is rendered into markdown. Some of these systems can be rigged up to be quite fancy, like generating OpenAPI specs from annotations and signatures.It is still cool to see what goes into managing a knowledge base of that size and scale. I'd be interested in what they use as front matter structure to organize everything.
While https://www.linode.com is still functional, the writing is on the wall.
Still interesting to see that they take great care of documentation just as another fundamental part of their systems.