-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use doc comments to generate the component docs #3698
Copy link
Copy link
Closed
Labels
domain: external docsAnything related to Vector's external, public documentationAnything related to Vector's external, public documentationdomain: internal docsAnything related to Vector's internal documentationAnything related to Vector's internal documentationhave: niceThis feature is nice to have. It is low priority.This feature is nice to have. It is low priority.
Metadata
Metadata
Assignees
Labels
domain: external docsAnything related to Vector's external, public documentationAnything related to Vector's external, public documentationdomain: internal docsAnything related to Vector's internal documentationAnything related to Vector's internal documentationhave: niceThis feature is nice to have. It is low priority.This feature is nice to have. It is low priority.
There's been a bit of a discussion for this before, but I decided to create an issue that we can track the progress on this idea with.
So, rust has this doc-comments macro (and a syntax sugar
///for it), and arustdocutility that can generate the human-readable documentation from them.It would be kind of cool to be able to use the same comments we have in the code as the documentation:
There are multiple approaches we could take to derive the website docs from the doc-comments:
rustdocgenerates the HTML documentation pages; we could parse the generated HTML and fetch the data out of it;rustdoccould also generate raw Markdown documentation (via-w/--output-formatflags) - that option has been deprecated though;rustdocis (re)gaining the ability to generate JSON via (--output-format json) - it's currently a WIP, but we could use that once it's implemented and goes out of nightly (or we could use it in nightly).rustdocto produce the output in the whatever form we need - that option has been deprecated though;///s from it.So, that's all I have to pose the problem, let's discuss!