-
Notifications
You must be signed in to change notification settings - Fork 734
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: consider adding a table of contents to readmes #516
Comments
cc @davidbarsky @yaahc do you have opinions on whether this is a good idea? |
The |
@hawkw I think it's a good idea, but one of the the issues I ran into with #496 is that I needed to update the doc in three places—the root To the best of my knowledge, we either need to use https://github.com/livioribeiro/cargo-readme or rely on the unstable rust-lang/rust#44732. |
@davidbarsky hmm, I think |
The proposed replacement is actually |
D'oh, thank you. |
FWIW, I don't think it is as critical to have a ToC in the lib docs as it is in the README...there's more stuff in the README. |
I'm a big fan of having a single source of information, though I feel like you end up wanting to add a few style bits when writing a README because of how github renders them that you dont end up wanting when rendering in rustdocs because of the way rustdoc renders the markdown, mainly a header / title element. As for the ToC, I'm not a huge fan of the idea because i worry that its a sign that the README has gotten out of hand. I tend to prefer rustdoc as a source of information about how to use the crate. I would prefer removing duplicated info from the readme and putting a more visible link to the docs over adding a ToC. |
Hmm. Given that the README forms the sort of "splash page" that you see immediately upon looking up a crate on crates.io, I think it's important for the README to have at least one usage example — it's the first thing new users will see, so I think it's good to make a first impression. And I think there are a lot of things we ought to have in the readme that don't really belong in the lib docs, especially "meta" sections about the crate/project itself (such as "Getting Help", "Contributing", "External Resources", etc). These are important to have in the documentation, but since they aren't documenting the library's APIs, I don't think they really belong in RustDoc... |
Yea, there should be enough info there for people to get an idea of what your crate does, how to set it up quickly, and maybe any common questions/answers people have. But I think the readme is closer being an about page/quickstart/advertisement than being actual documentation. Agree about the getting help, contrib, etc. That is good stuff for the README, its like repo documentation vs crate documentation. If when the README is restricted to non library documentation tasks it's still big enough to be hard to navigate then a ToC makes sense. |
@yaahc i do want to point out who it was that suggested we put "getting started" docs in the README in the first place :P :P :P :P |
Feature Request
Crates
tracing
Motivation
Now that we've added a lot of usage examples to the repo root and
tracing
crate's README files, they've started to get quite long.Proposal
Maybe we should add a table of contents with links to the different sections?
Alternatives
Alternatively, we could..."not do this".
The text was updated successfully, but these errors were encountered: