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

[Question] Tutorial and other modules documentation #347

Closed
gbonnema opened this issue May 17, 2019 · 9 comments
Closed

[Question] Tutorial and other modules documentation #347

gbonnema opened this issue May 17, 2019 · 9 comments

Comments

@gbonnema
Copy link

Looking at the tutorials, I see they are not generated when I do cargo doc --open. I know I could use pandoc on any of them, but I am looking for "the official way" to see all the docs.

Also, checking out the docs of other packages that Cursive uses, even if I generate all (cargo doc --all) don't show up in the docs that I get to browse when doing cargo doc --open. All I get to see is the Cursive documentation. I can open package docs one by one using cargo doc --open -p <package-name>. Is there an overview of package docs (including Cursive) or this just not possible?

So in summary my questions are:

  1. How to show the tutorials? Or do I do that with pandoc manually?
  2. How to show the other package docs?

P.S. I did find there is still an issue on cargo doc (rust-lang/cargo#739) but hasn't been worked on since 2017 so I am not sure how much of that is implemented.

@gyscos
Copy link
Owner

gyscos commented May 17, 2019

Hi!
I don't have any specific method of showing the tutorials - you can read them on github as it has a nice markdown viewer, or read them as text files (markdown is mostly readable).

Some projects use dummy modules to hold tutorials; that'd be an option too.

Regarding documentation for other packages, do you mean other crates? It should be in the left sidebar:

Screenshot from 2019-05-17 09-40-06

@gyscos
Copy link
Owner

gyscos commented May 17, 2019

I just learned about [package.metadata.docs.rs] in Cargo.toml, which would let us have a tutorial feature turned on for docs.rs, but usually turned off.

@gbonnema
Copy link
Author

Your screenprint shows crates, which my page does not. Do you call this with cargo doc --open? If so, then I don't know why I don't see the crates.

Screenshot from 2019-05-17 20-00-12

@gbonnema
Copy link
Author

I just learned about [package.metadata.docs.rs] in Cargo.toml, which would let us have a tutorial feature turned on for docs.rs, but usually turned off.

That is hopeful! So ... a change for the Cargo.toml?

@gyscos
Copy link
Owner

gyscos commented May 17, 2019

Your screenprint shows crates, which my page does not.

Hmm, that's weird. I just ran cargo doc --open as well. What's your cargo version? (Mine is cargo 1.36.0-nightly (759b6161a 2019-05-06)) Do you have a ~/.cargo/config? Or a .cargo/config in the cursive repo?

@gbonnema
Copy link
Author

My cargo version is cargo 1.34.0 (6789d8a0a 2019-04-01). Maybe I need to upgrade cargo somehow. I will check how to upgrade cargo.

I don't have a ~/.cargo/config, although I do have a ~/.cargo directory with a bin directory and a registry directory.

@gyscos
Copy link
Owner

gyscos commented May 17, 2019

It might be a cargo bug then? You may want to open a ticket on https://github.com/rust-lang/cargo.

@gbonnema
Copy link
Author

I did an update using rustup and got the same version of cargo as I had (1.34.0), so it might be a new feature of cargo. To be sure I will issue a question on github like you suggest.

@gbonnema
Copy link
Author

As it turns out it was my bad: js was disabled. I have that as a precaution. Only certain js sites are enabled.

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

No branches or pull requests

2 participants