-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
docs: Auto generate command list #1119
Conversation
How about using |
I do think this should be auto-generated, especially when contributors and even the maintainers sometime miss it. We could set a check to see if it's the latest in CI. |
That seems like a good idea, I'll adopt it for the PR. We could also add some tasks for compiling and cleaning tree-sitter grammars, though that seems more appropriate for a |
3e4c608
to
74f993b
Compare
I have added an action to auto commit documentation changes using https://github.com/stefanzweifel/git-auto-commit-action, but due to limitations imposed by GitHub it cannot run on a PR and commit changes to the fork (it's doable but requires the contributor to jump through some hoops as explained here), and as such I have configured it to run on push to master which should be good enough. |
What about simply adding a CI lint that checks the docs are up to date or else suggesting to the contributor to re-run the command? I'm a bit wary of depending on 3rd party GitHub Actions, and auto-committing to master after each change could get really noisy. |
Alternatively, rather than running the |
I've changed it to a lint that runs alongside other checks. Also isn't the |
Oh I mean, rather than generating the doc files ahead of time and commiting them to git, generate them at |
Either option works for me |
7bf4946
to
ff3be8c
Compare
Rebased and reworded history 🎉 (I settled on lint since it seemed the easiest to get started with). |
ff3be8c
to
4b3e22e
Compare
4b3e22e
to
d31c116
Compare
113e534
to
53c7764
Compare
53c7764
to
e215614
Compare
Adds a crate binary
helix-docs
which generates automatic documentation for typable commands (and other things in the future). The current method simply importshelix-term
and iterates through every command and generates a markdown string which is written to a file inbook/src/generated/
and then included in the book output. I didn't pull in any crates for programatically generating markdown and went with simple string interpolation since it satisfies our needs for now.Generate docs with:
I'm not sure how to integrate this with the CI, which would be able to automate the generation itsef.