Skip to content

Render not_found with an absolute path to the rust stylesheet #14201

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

Closed
wants to merge 1 commit into from

Conversation

richo
Copy link
Contributor

@richo richo commented May 14, 2014

This fixes the stylesheets being relative. The fix is a little bit sketchy but I don't see a cleaner way to do this offhand.

Updates #14126

@alexcrichton
Copy link
Member

Just confirming, but you've built this successfully? I've had getopts complain in the past about duplicate options on the command line (this is passing --markdown-css twice).

@richo
Copy link
Contributor Author

richo commented May 14, 2014

Yup, I just built it then (albeit with a few days old rustc):

Build output:

xenia ± make doc/not_found.html NO_REBUILD=1                           ~/code/ext/rust docs/absolute_stylesheets (?2)
cfg: build triple x86_64-apple-darwin
cfg: host triples x86_64-apple-darwin
cfg: target triples x86_64-apple-darwin
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-apple-darwin is x86_64
cfg: os for x86_64-apple-darwin is apple-darwin
cfg: using clang
cfg: no pdflatex found, deferring to xelatex
cfg: no xelatex found, deferring to lualatex
cfg: no lualatex found, disabling LaTeX docs
cfg: no pandoc found, omitting PDF and EPUB docs
cfg: no llnextgen found, omitting grammar-verification
DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/richo/code/ext/rust/x86_64-apple-darwin/stage2/lib" x86_64-apple-darwin/stage2/bin/rustdoc --markdown-css rust.css --markdown-before-content=doc/version_info.html --markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc --markdown-css http://static.rust-lang.org/doc/master/rust.css /Users/richo/code/ext/rust/src/doc/not_found.md
xenia ±

I quickly checked that it works, but while double checking this, I noticed that it actually adds a second link tag, instead of replacing the old one. This will work, but it is a little janky and it does have one obvious place where it'll do something odd (404 in a directory with a rust.css in it)

@richo
Copy link
Contributor Author

richo commented May 14, 2014

Updated build here: http://richo.psych0tik.net/rust-docs/not_found.html

Note that I didn't hose the old content, so this will be loading both stylesheets, and doesn't look obviously broken, but who knows what might happen in future.

@alexcrichton
Copy link
Member

Can we tweak how the css is added so only one stylesheet is present? You may have to factor out the css variable into a separate variable in the makefiles, or have RUSTDOC_HTML_OPTS_NO_CSS or something like that

@richo
Copy link
Contributor Author

richo commented May 14, 2014

Good idea. Implemented.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request May 15, 2014
Closes rust-lang#14210 (Make Vec.truncate() resilient against failure in Drop)
Closes rust-lang#14206 (Register new snapshots)
Closes rust-lang#14205 (use sched_yield on linux and freebsd)
Closes rust-lang#14204 (Add a crate for missing stubs from libcore)
Closes rust-lang#14201 (Render not_found with an absolute path to the rust stylesheet)
Closes rust-lang#14198 (update valgrind headers)
Closes rust-lang#14174 (Optimize common path of Once::doit)
Closes rust-lang#14162 (Print 'rustc' and 'rustdoc' as the command name for --version)
Closes rust-lang#14145 (Better strict version hash (SVH) computation)
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 20, 2025
…not implement `Copy` (rust-lang#14207)

Fix rust-lang#14201

changelog: [`unnecessary_map_or`]: do not consume the comparison value
if it does not implement `Copy`
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 this pull request may close these issues.

2 participants