Skip to content

Commit

Permalink
rustdoc: remove unused 16x16 favicon
Browse files Browse the repository at this point in the history
According to <https://caniuse.com/?search=svg%20favicon>,
SVG favicons are supported in everything but Safari.

When I actually try it in Safari, it's downloading all
three favicons, and nothing looks different when I disable
the 16x16 one.

<https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7>,
which is linked from caniuse above, recommends an ico.
However, the reason they recommend it is the apps that
only support /favicon.ico exactly, and rustdoc can't assume
it will be installed to the site root, so it's unfortunately
up to the webmaster to make sure it's set up.
  • Loading branch information
notriddle committed Apr 10, 2024
1 parent 234314a commit b47ffc2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
Binary file removed src/librustdoc/html/static/images/favicon-16x16.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/librustdoc/html/static_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static_files! {
license_mit => "static/LICENSE-MIT.txt",
rust_logo_svg => "static/images/rust-logo.svg",
rust_favicon_svg => "static/images/favicon.svg",
rust_favicon_png_16 => "static/images/favicon-16x16.png",
rust_favicon_png_32 => "static/images/favicon-32x32.png",
fira_sans_regular => "static/fonts/FiraSans-Regular.woff2",
fira_sans_medium => "static/fonts/FiraSans-Medium.woff2",
Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/html/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
{% if !layout.favicon.is_empty() %}
<link rel="icon" href="{{layout.favicon}}"> {# #}
{% else %}
<link rel="alternate icon" type="image/png" {#+ #}
href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {# #}
<link rel="alternate icon" type="image/png" {#+ #}
href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #}
<link rel="icon" type="image/svg+xml" {#+ #}
Expand Down

0 comments on commit b47ffc2

Please sign in to comment.