One approach I've played with in this space is having the documentation strongly coupled with the test suite (hence providing CI for docs): https://github.com/dontcallmedom/jsodiff/blob/main/tool/update-documentation.js https://github.com/dontcallmedom/jsodiff/blob/main/test/cli.js (which of course it itself very badly documented)