bazelbuild / stardoc

Stardoc: Starlark Documentation Generator
Apache License 2.0
108 stars 45 forks source link

Add native support for cross-referencing rules and rule attributes #252

Open armandomontanez opened 2 months ago

armandomontanez commented 2 months ago

While building out a set of rules, I've been mentioning various rules and rule attributes in doc strings, and wasn't able to find any portable way to do cross referencing between generated docs. Since I've been exporting to markdown, I've been solving this via [foo](#bar_rule-foo) entries to cross-reference anchors on the same page. Unfortunately, this syntax is not inherently portable to other doc generation schemes, so if I regenerate the docs to a new format (which I'd like to do eventually) there's no guarantee that the links will continue to work.

It would be really great if stardoc could be extended to natively support expressing cross-references in document generation in a portable way.