Recently, there has been a new development in the Bazel Central Registry that allows documentation to be hosted directly on BCR: https://blog.aspect.build/stardocs-on-bcr
The steps to include the docs as part of BCR are documented on the blog. Or an example from bazel_lib itself:
https://github.com/bazel-contrib/bazel-lib/blob/0a2f475200309e581f4e0d8aa6989eda7caed4e6/.bcr/source.template.json#L4
https://github.com/bazel-contrib/bazel-lib/blob/0a2f475200309e581f4e0d8aa6989eda7caed4e6/.github/workflows/release_prep.sh#L46-L52
This is nice because it allows package documentation to be centralized and versioned.
Recently, there has been a new development in the Bazel Central Registry that allows documentation to be hosted directly on BCR: https://blog.aspect.build/stardocs-on-bcr
The steps to include the docs as part of BCR are documented on the blog. Or an example from
bazel_libitself:https://github.com/bazel-contrib/bazel-lib/blob/0a2f475200309e581f4e0d8aa6989eda7caed4e6/.bcr/source.template.json#L4
https://github.com/bazel-contrib/bazel-lib/blob/0a2f475200309e581f4e0d8aa6989eda7caed4e6/.github/workflows/release_prep.sh#L46-L52
This is nice because it allows package documentation to be centralized and versioned.