commit | 64eb014524a0cbfb3ae91c2732af086daa358c77 | [log] [tgz] |
---|---|---|
author | Alex Humesky <ahumesky@google.com> | Fri Apr 12 21:50:13 2024 -0400 |
committer | GitHub <noreply@github.com> | Fri Apr 12 21:50:13 2024 -0400 |
tree | 1e68b0953fd3d2b0cee95b2f919ca24518924302 | |
parent | ac297a459f4fee416f98a43fea168313fc11c1a7 [diff] |
Enable generating a table of contents in Stardoc (#203) Adds a bool `generate_table_of_contents` to `stardoc()` to enable table of contents. This defaults to False for backwards compatibility. Adds a Label `table_of_contents_template` to `stardoc()` to specify the vm template. The default table of contents template looks like this (from the test): > ## Rules > > - [my_rule](#my_rule) > > ## Providers > > - [MyFooInfo](#MyFooInfo) > - [MyVeryDocumentedInfo](#MyVeryDocumentedInfo) > > ## Functions > > - [check_sources](#check_sources) > - [returns_a_thing](#returns_a_thing) > > ## Aspects > > - [my_aspect](#my_aspect) > - [other_aspect](#other_aspect) > > ## Repository Rules > > - [my_repo](#my_repo) > > ## Module Extensions > > - [my_ext](#my_ext)
Stardoc is a documentation generator for Bazel build rules written in Starlark.
Stardoc provides a Starlark rule (stardoc
, see documentation) that can be used to build documentation for Starlark rules in Markdown. Stardoc generates one documentation page per .bzl
file.
Stardoc is a replacement for the deprecated “Skydoc” documentation generator.
See Skydoc Deprecation for details on the deprecation and migration details.
See our future plans for refactoring Stardoc to be more consistent with how Bazel evaluates .bzl files, and what it means for maintenance of this project.
See the maintaner's guide for instructions for cutting a new release.