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

Can't check that links work locally #179

Closed
jyn514 opened this issue Dec 19, 2019 · 1 comment · Fixed by #282
Closed

Can't check that links work locally #179

jyn514 opened this issue Dec 19, 2019 · 1 comment · Fixed by #282

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 19, 2019

I'm trying to add more links to the book as I go to things like ptr::offset and mem::transmute that I haven't seen before and would like to read up on. However, I can't test locally whether my changes work, because they point to relative links like ../std/primitive.pointer.html#method.offset. How can I test that my links are working before I make a PR?

@jyn514
Copy link
Member Author

jyn514 commented Dec 19, 2019

The way I got around this locally is to build the rust compiler from source (ouch):

$ git clone https://github.com/rust-lang/rust rustc && cd rustc
$ ./x.py doc src/libstd --stage 1 
$ cd build/x86_64-unknown-linux-gnu/crate-docs
$ ln -s /path/to/nomicon/book nomicon

And then I open rustc/build/x86_64-unknown-linux-gnu/crate-docs/nomicon/index.html instead of /path/to/nomicon/book/index.html, running mdbook build in the nomicon repo as necessary.

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

Successfully merging a pull request may close this issue.

1 participant