Add getting started guide#1134
Conversation
dtacalau
left a comment
There was a problem hiding this comment.
Looks good apart from one missing word.
kleimkuhler
left a comment
There was a problem hiding this comment.
I really like the idea of adding this! Is nesting a guide within a crate module a common practice though? I have not seen it before. If a user didn't know it was there--or even to look for it--it doesn't seem that easy to find.
When the documentation is built, it also looks a little odd to have guide listed as a module along with event, net, and unix. I think modules should be used strictly for scoping functionality, not necessarily a getting started guide? Let me know your thoughts though I'd really like to add this in some way!
Not sure, but as you mentioned in #1133, doc.rs/these API docs are one of the sources new users look first. This also has the added benefit of running the examples as tests for us.
I'll add a section to the made docs for this.
We could rename |
|
@Thomasdezeeuw You can probably just make a Re: API doc usability. Scrolling on the entry point never really bothered me. I always hit |
The problem with regular As for other crates that use docs.rs for additional docs (such as guides): https://docs.rs/snafu/0.6.0/snafu/guide/index.html. But if everybody else agrees that this isn't the place for it I'll move it a doc directory. |
FWIW, I think having the guide in the RustDoc is a good idea for discoverability, since most people tend to start on docs.rs these days, and it's often hard to find external docs from within RustDoc. For example, I don't think Additionally, it has the significant advantage of ensuring that the examples don't get out of date and are built alongside every change. I think that's worth a lot, to the extent that I've been considering removing code samples from IMO, putting guides in the RustDoc is a good approach for |
kleimkuhler
left a comment
There was a problem hiding this comment.
@hawkw Thanks for the thoughts on this!
@Thomasdezeeuw I also would like for the examples to still be tested so that they do not fall out of sync. I would be concerned about moving them into separate .md files.
With the comments above pointing out some other crates that have done something similar and the benefits of doing so, I would be okay with this change going through!
With the points made here though, I'm not sure I agree with the proposed changes in #1133 about moving the example to an .md file. I don't think the README is as discoverable as what renders on docs.rs and it's possible for the example to get out of sync. Could we consider making the example smaller?
|
Testing of arbitrary md files can be handled with: https://github.com/budziq/rust-skeptic if a separate |
This new feature adds additional documentation in the form of a user guide.
|
I've added a new "guide" feature (disable by default, enable on docs.rs) and put the user guide behind it. @carllerche I perosnally don't really like the idea of even more tools to run ours tests. I hope the latests change is good enough for you. |
|
I'm merging this even though there is no consensus. I think we should try it this way, if we come to the conclusion it sucks we can move it to a docs directory. |
No description provided.