keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

Provide technical documentation as docblock comments on types

Open airtonix opened this issue 1 year ago • 1 comments

This way our editors LSP will be able to help us read your documentation without leaving our editor.

Since it's all typescript, i'm only asking for narrative documentation to help explain why someone would want to use particular types.

This might also be an opportunity to create a parser for keystatic that can take in a glob of typescript files and produce content nodes, resulting in the ability to produce technical documentation websites that can intermix natural approachable content with snippets from the parsed code comments.

It's also a chance to start introducing some accountability in the architecture decisions so that team work can scale async, if it was explained in comments what the usecase and purpose of CollectionEntry vs Entry was, then refactorings/additions would be less tedious and shocking in the long run.

airtonix avatar Jan 11 '24 22:01 airtonix

it looks like you can probably save a lot of effort and lean on the newer version of typedoc since it's able to output json:

https://typedoc.org/options/output/#json

and it looks like the typedoc website itself does this:

https://typedoc.org/api/docs.json

airtonix avatar Jan 11 '24 23:01 airtonix