Skip to content

Commit b05af1f

Browse files
richoalexcrichton
authored andcommitted
Render not_found with an absolute path to the rust stylesheet
1 parent 3aad0e2 commit b05af1f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

mk/docs.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport complement-cheatsheet \
3232
complement-lang-faq complement-project-faq rust rustdoc \
33-
guide-unsafe not_found
33+
guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

@@ -42,10 +42,11 @@ L10N_LANGS := ja
4242
# Generally no need to edit below here.
4343

4444
# The options are passed to the documentation generators.
45-
RUSTDOC_HTML_OPTS = --markdown-css rust.css \
46-
--markdown-before-content=doc/version_info.html \
45+
RUSTDOC_HTML_OPTS_NO_CSS = --markdown-before-content=doc/version_info.html \
4746
--markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc
4847

48+
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
49+
4950
PANDOC_BASE_OPTS := --standalone --toc --number-sections
5051
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \
5152
--from=markdown --include-before-body=doc/footer.tex --to=latex
@@ -152,6 +153,11 @@ doc/footer.tex: $(D)/footer.inc | doc/
152153
@$(call E, pandoc: $@)
153154
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
154155

156+
# HTML (rustdoc)
157+
DOC_TARGETS += doc/not_found.html
158+
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
159+
$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css http://static.rust-lang.org/doc/master/rust.css $<
160+
155161
define DEF_DOC
156162

157163
# HTML (rustdoc)

0 commit comments

Comments
 (0)