Rollup merge of #146170 - kumarUjjawal:master, r=Mark-Simulacrum
fix: offline rustdoc html missing favicon As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG. <img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
This commit is contained in:
commit
cb64a77550
3 changed files with 29 additions and 2 deletions
|
|
@ -575,6 +575,31 @@ impl Step for SharedAssets {
|
|||
FileType::Regular,
|
||||
);
|
||||
|
||||
builder.copy_link(
|
||||
&builder
|
||||
.src
|
||||
.join("src")
|
||||
.join("librustdoc")
|
||||
.join("html")
|
||||
.join("static")
|
||||
.join("images")
|
||||
.join("favicon.svg"),
|
||||
&out.join("favicon.svg"),
|
||||
FileType::Regular,
|
||||
);
|
||||
builder.copy_link(
|
||||
&builder
|
||||
.src
|
||||
.join("src")
|
||||
.join("librustdoc")
|
||||
.join("html")
|
||||
.join("static")
|
||||
.join("images")
|
||||
.join("favicon-32x32.png"),
|
||||
&out.join("favicon-32x32.png"),
|
||||
FileType::Regular,
|
||||
);
|
||||
|
||||
SharedAssetsPaths { version_info }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
<link rel="icon" href="https://www.rust-lang.org/favicon.ico">
|
||||
<link rel="alternate icon" type="image/png" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
<meta name="robots" content="noindex,follow">
|
||||
<link rel="icon" href="https://www.rust-lang.org/favicon.ico">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png">
|
||||
<link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue