Skip to content
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

Stardoc generates repository.md #1123

Merged
merged 2 commits into from
Oct 29, 2021
Merged

Conversation

alexeagle
Copy link
Contributor

This is a mirror of the content in repository.rst, allowing us to manually inspect the delta between them:
LHS https://github.com/bazelbuild/bazel-gazelle/blob/master/repository.rst
RHS https://github.com/aspect-dev/bazel-gazelle/blob/stardoc/repository.md

As soon as we are satisfied that the generated content is correct, we'll delete repository.rst and update any links to it.
(This could happen as part of this PR, or subsequent)

Technique: copied doc strings out of existing rst file into the starlark files. Transcribed rst syntax to markdown.

First step in addressing #763
Remaining steps will be to rinse-and-repeat for other .rst files containing rule APIs

@alexeagle alexeagle force-pushed the stardoc branch 2 times, most recently from 86428c8 to bdee0f4 Compare October 21, 2021 21:11
@achew22
Copy link
Member

achew22 commented Oct 21, 2021

I think this is a great start! Thanks for doing this. The first thing that jumps out to me is that your .md version has git_repository first. That is deprecated and I suspect that most readers are at best skimming this document. Is there any way to reorder it so that the go_repository rule comes first?

@alexeagle
Copy link
Contributor Author

yup, I noticed the same thing while diffing them.

even with stardoc given

symbol_names = [
    "go_repository",
    "git_repository",
    "http_archive",
],

they still appear alphabetically in the generated file. So I don't think this is possible with stardoc's current public API

This is a mirror of the content in repository.rst, allowing us to manually inspect the delta between them.
As soon as we are satisfied that the generated content is correct, we'll delete repository.rst and update any links to it.

Technique: copied doc strings out of existing rst file into the starlark files. Transcribed rst syntax to markdown.
@alexeagle
Copy link
Contributor Author

FWIW the page does start with an index of the rules, and links to them, so the hurried reader might click the go_repository link and not get lost in the deprecated rule

@achew22
Copy link
Member

achew22 commented Oct 29, 2021

LGTM, thanks @alexeagle. This is a huge step in the right direction for the repo. We should consider following up with a 302 or a link in the .rst file

@achew22 achew22 merged commit 425d85d into bazelbuild:master Oct 29, 2021
@alexeagle alexeagle deleted the stardoc branch October 29, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants