-
Notifications
You must be signed in to change notification settings - Fork 475
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
Discussion: use rustdoc for blocks' documentation #1127
Comments
I like the idea of increasing maintainability but going with rustdoc it ends up being a bit overwhelming for standard users. Is there a rustdoc option to hide all the struct declarations and such? |
Unfortunately, I don't think there in an option to hide trait I can imagine that if there was an option to output markdown, it would be easy to make the documentation cleaner for users. From rust-lang/rust#44136 I understand that there were plans to support other output formats but it will never be implemented. |
Actually that might not be too bad! |
Should we go ahead and do it? |
@ammgws If you like how https://maxverevkin.github.io/swaystatus/docs/swaystatus/blocks/index.html looks then I suppose. |
It's grown on me |
That issue was out of date, I updated it - there's an unstable JSON output format on nightly :) rust-lang/rust#76578 |
@MaxVerevkin Do the docs have to be checked into the repo like at swaystatus for this to be usable online? |
I think so, |
Do others publish programs to crates.io? I always thought it was for libraries that other crates can then import. Wonder if there's another way.. |
Well, there are |
As a workaround, you could move your current binary to a library with a |
Will it work for a crate which is both a library and a binary?
Yeah, publishing a new version after every change in documentation doesn't sound great. |
No, you'd have to make a new library if you want that to work. (or work on the docs.rs issue 😉) |
Actually if we just keep the docs in a separate branch and have a github action to generate them then we can do this, e.g.: https://github.com/houqp/leptess |
Nice! Didn't know https://github.com/marketplace/actions/deploy-to-github-pages existed :) |
Closing now that async branch is merged into master. However we now need a way to generate manpages to replace our old script that parsed |
Well... A little script/program can be written to iterate through every file in |
By the way, perhaps we can remove the "Required" column for better readability (especially in manpages)? Required options are rare and their "Default" can be set to "N/A" or "Required". |
And to use this escape sequence you need |
Good catch, sounds good to me. |
In-code documentation is just easier to maintain.
The question is whether it is actually convenient for users. Here is an example of documentation (time block): https://maxverevkin.github.io/i3status-rust/doc/i3status_rs/blocks/time/index.html
The text was updated successfully, but these errors were encountered: