Hacker News new | ask | show | jobs
by fesc 1068 days ago
I am a little bit disappointed.

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.

3 comments

So basically the treat their docs as if it's code, i.e. use version control, CI etc. for it, but it's still not really code.

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.

If we're going to be persnickety, that your "actual docs as code" sounds more like "code as docs." Because you're writing code and turning it into docs. "Docs as code" seems more like if you wrote docs and treated them as code.
I think I’d call that “docs in/from/are code.” “Docs as code” couldn’t be more literal and clear when treating doc as if they were code.