Hacker News new | ask | show | jobs
by jestar_jokin 2065 days ago
I evaluated formats for online docs for a Node.js library I was writing. Asciidoc(tor) was the only one I found that was available as JS lib (thanks to Asciidoctor.js), but more importantly, it could include marked sections from external code files within the docs.

This meant I could write code examples within unit tests, and include sections of those tests in the docs, keeping the docs in sync with the actual code and making sure the examples are still valid.

Does anyone know another doc format that supports this?