I've been playing around with streamlining documentation by pulling JSDoc comments straight into an #11ty website. I'll try and write it up once I get it to somewhere I'm a bit happier with.
For example, this page is partially generated based on the comments directly in the JavaScript code
https://github.com/robb-j/gruber/blob/main/postgres/postgres-migrator.ts
It's pretty cool, and hopefully makes the documentation so much closer to edit when the code itself changes, Though I think there needs to be more curatability in it.
Some screenshots so it's easier to understand: