Skip to content

Commit c695de0

Browse files
authored
Rollup merge of #93418 - ojeda:no-shortcut, r=camelid
rustdoc & doc: no `shortcut` for `rel="icon"` According to https://html.spec.whatwg.org/multipage/links.html#rel-icon: > For historical reasons, the `icon` keyword may be preceded by the keyword "`shortcut`". And to https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types: > **Warning:** The `shortcut` link type is often seen before `icon`, but this link type is non-conforming, ignored and **web authors must not use it anymore.** While it was removed from the Rust logo case a while ago in commit 085679c ("Use theme-adaptive SVG favicon from other Rust sites"), it is still there for the custom logo case. Also updated a few other instances. Signed-off-by: Miguel Ojeda <[email protected]>
2 parents 4c70200 + 30685ed commit c695de0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/doc/favicon.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
1+
<link rel="icon" href="https://www.rust-lang.org/favicon.ico">

src/doc/redirect.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<meta name="robots" content="noindex,follow">
2-
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
2+
<link rel="icon" href="https://www.rust-lang.org/favicon.ico">

src/doc/rustdoc/src/the-doc-attribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This form of the `doc` attribute lets you control the favicon of your docs.
5959
#![doc(html_favicon_url = "https://example.com/favicon.ico")]
6060
```
6161

62-
This will put `<link rel="shortcut icon" href="{}">` into your docs, where
62+
This will put `<link rel="icon" href="{}">` into your docs, where
6363
the string for the attribute goes into the `{}`.
6464

6565
If you don't use this attribute, there will be no favicon.

src/librustdoc/html/templates/page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#}
5555
{%- endif -%}
5656
{%- if !layout.favicon.is_empty() -%}
57-
<link rel="shortcut icon" href="{{layout.favicon}}"> {#- -#}
57+
<link rel="icon" href="{{layout.favicon}}"> {#- -#}
5858
{%- else -%}
5959
<link rel="alternate icon" type="image/png" {# -#}
6060
href="{{static_root_path|safe}}favicon-16x16{{page.resource_suffix}}.png"> {#- -#}

0 commit comments

Comments
 (0)