Skip to content

Commit d34e011

Browse files
committed
auto merge of #16209 : tomjakubowski/rust/rustdoc-html-changes, r=alexcrichton
This PR introduces a couple of minor changes to the rustdoc html templates: 1. The `<meta name="generator" content="rustdoc">` tag now appears in API documentation as well. 2. Adds a `rustdoc` class to the top-level `<body>` tag on all HTML pages. The second point is a nice-to-have for those who would like to apply a user stylesheet to Rust documentation regardless of where it is hosted. Easier use of user stylesheets may alleviate much of the bikeshedding of personal taste on the rustdoc styles.
2 parents 8b9ab0d + 9b44dfc commit d34e011

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustdoc/html/layout.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ r##"<!DOCTYPE html>
3939
<meta charset="utf-8">
4040
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4141
<meta name="description" content="The {krate} library documentation.">
42+
<meta name="generator" content="rustdoc">
4243
4344
<title>{title}</title>
4445
@@ -47,7 +48,7 @@ r##"<!DOCTYPE html>
4748
{favicon}
4849
{in_header}
4950
</head>
50-
<body>
51+
<body class="rustdoc">
5152
<!--[if lte IE 8]>
5253
<div class="warning">
5354
This old browser is unsupported and will most likely display funky

src/librustdoc/markdown.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn render(input: &str, mut output: Path, matches: &getopts::Matches,
9898
{css}
9999
{in_header}
100100
</head>
101-
<body>
101+
<body class="rustdoc">
102102
<!--[if lte IE 8]>
103103
<div class="warning">
104104
This old browser is unsupported and will most likely display funky

0 commit comments

Comments
 (0)