rust/src/librustdoc
Jacob Hoffman-Andrews 3649b90b33 Simplify rendering of stylesheet links into HTML
We carry around a list of stylesheets that can carry two different types
of thing:

 1. Internal stylesheets specific to a page type (only for settings)
 2. Themes

In this change I move the link generation for settings.css into
settings(), so Context.style_files is reserved just for themes.

We had two places where we extracted a base theme name from a list of
StylePaths. I consolidated that code to be a method on StylePath.

I moved generation of link tags for stylesheets into the page.html
template. With that change, I made the template responsible for special
handling of light.css (making it the default theme) and of the other
themes (marking them disabled). That allowed getting rid of the
`disabled` field on StylePath.
2021-11-24 19:41:47 -08:00
..
clean Auto merge of #91094 - inquisitivecrystal:rustdoc-top-mod, r=jyn514 2021-11-23 03:13:26 +00:00
doctest Rename --display-warnings to --display-doctest-warnings 2021-09-14 10:49:56 +02:00
formats rustdoc: Move doc-reachability visiting back to cleaning 2021-11-19 22:00:37 -05:00
html Simplify rendering of stylesheet links into HTML 2021-11-24 19:41:47 -08:00
json rustdoc: Use ty::ImplPolarity instead of custom enum 2021-11-07 08:57:33 -08:00
passes Use fast comparison against kw::Empty 2021-11-19 11:34:41 -05:00
theme Clean up rustdoc static files 2021-07-07 17:52:18 +02:00
Cargo.toml rustdoc: Switch to mainline rayon 2021-10-28 18:26:57 -07:00
config.rs Simplify rendering of stylesheet links into HTML 2021-11-24 19:41:47 -08:00
core.rs rustdoc: Pass DocContext to Cache::populate 2021-11-19 17:55:40 -05:00
docfs.rs rustdoc: Remove a single-use macro 2021-10-28 18:39:32 -07:00
doctest.rs fix(doctest): detect extern crate items in statement doctests 2021-11-22 19:47:58 -07:00
error.rs Simplify rendering of stylesheet links into HTML 2021-11-24 19:41:47 -08:00
externalfiles.rs rustdoc: Fix some unescaped HTML tags in docs 2021-11-19 15:54:05 -05:00
fold.rs rustdoc: Use conditional for _stripped fold 2021-11-04 09:43:13 -07:00
lib.rs Delete rustdoc::doctree 2021-11-13 21:50:13 +08:00
lint.rs Warn when rustdoc:: group is omitted from lint names 2021-07-03 15:32:09 -04:00
markdown.rs heading_level: u32 -> heading_offset: HeadingOffset 2021-10-04 22:28:04 -04:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs Auto merge of #90635 - matthiaskrgr:rustdoc_compl, r=GuillaumeGomez 2021-11-07 02:17:35 +00:00
theme.rs Change librustdoc write(.. \n) to writeln(..); fix comment in grammar 2021-05-03 02:19:57 -05:00
visit.rs List all cases explicitly in Doc{Folder,Visitor} 2021-11-01 16:15:46 -07:00
visit_ast.rs Delete rustdoc::doctree 2021-11-13 21:50:13 +08:00
visit_lib.rs Add ty::Visibility::is_public() 2021-11-09 18:35:00 -08:00

For more information about how librustdoc works, see the rustc dev guide.