Skip to content

Commit

Permalink
Add Ayu theme to rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Cldfire committed Jul 12, 2020
1 parent 0e89f50 commit 8c45cf8
Show file tree
Hide file tree
Showing 3 changed files with 571 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ pub fn run(
// prevent rule conflicts
scx.style_files.push(StylePath { path: PathBuf::from("light.css"), disabled: false });
scx.style_files.push(StylePath { path: PathBuf::from("dark.css"), disabled: true });
scx.style_files.push(StylePath { path: PathBuf::from("ayu.css"), disabled: true });

let dst = output;
scx.ensure_dir(&dst)?;
Expand Down Expand Up @@ -654,6 +655,12 @@ fn write_shared(
static_files::themes::DARK,
options.enable_minification,
)?,
"ayu" => write_minify(
&cx.shared.fs,
cx.path("ayu.css"),
static_files::themes::AYU,
options.enable_minification,
)?,
_ => {
// Handle added third-party themes
let content = try_err!(fs::read(&entry.path), &entry.path);
Expand Down
Loading

0 comments on commit 8c45cf8

Please sign in to comment.