-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for reStructuredText #191
Comments
@tetromino WDYT? |
Sorry for the very late reply, I was on baby bonding leave. I'd be happy to review patches for adding reST support (you'd probably want to refer to the current Markdown rendering code in src/main/java/com/google/devtools/build/skydoc/rendering/... for an example) and to answer any questions. Alas, I don't have time to write the reST renderer myself :) |
FWIW: I ended up doing some pretty heavy sphinx and stardoc integration for rules_python's doc stuff:
Frankly, I think the result is pretty awesome. It feels so good to be able to use a combination of generated and manual docs that can easily link to each other and external symbols. The manually written API docs are helpful because the bzl domain allows you to document objects that stardoc doesn't natively support (e.g. command line flags). Plus you get Sphinx search, a generated human-friendly index of the code, a generated object index of everything for other projects to consume. You can check it out at https://github.com/bazelbuild/rules_python/tree/main/sphinxdocs |
Cool 😎 Will dive in when I'm back from vacation next week |
@rickeylev Would it be possible to extract this setup into a |
This is awesome! We build our documentation (https://pigweed.dev) using Sphinx, and we've long talked about doing it using Bazel, but felt a little overwhelmed. Looks like we should take a shot at it! Regarding extracting into |
Breaking it out isn't necessary, but it's not clear to me whether this package in rules_python is set up for consumption by other rulesets vs. just a set of internal rules for rules_python's needs. |
I'm favorable on the idea. I haven't yet because (1) I don't have time to have to deal with all the surrounding setup (ci, actions, bcr, bla bla; I get all that for free in rules_python), and (2) it's been convenient to edit rules_python docs and doc generator stuff in the same PR, especially as rules_python docs uncover edge cases (I have like 0 tests because testing generated HTML is a PITA, and debugging programs invoked in actions is a bigger PITA).
Yeah, the transitive dependencies would remain about the same. Avoiding the py_binary dependency is tough because Sphinx uses a plugin model.
It's both, essentially. "Public but unstable". I've had to make a few changes that would normally be considered breaking. It has public visibility (I plan to use it in rules_test, but there was also a user request to use it, too), and people are free to use it.
Yeah. I wouldn't call it hard, but it wasn't easy. Each part is "medium", but there's several pieces that need to be wired together (Sphinx, stardoc, the plugin, surrounding bzl code, subtleties of the RTD environment, probably other stuff i'm forgetting). |
Hi, the Pigweed team is interested in using stardoc. One problem: we use Sphinx and write our docs in reStructuredText. Could you all implement reST support? Or would you be open to a contribution that adds reST support? Sphinx is a very popular tool for generating docs sites, and by extension reST is fairly popular, so I think it could be worthwhile to invest in reST support.
The text was updated successfully, but these errors were encountered: