From 748cdda776c19593aaf5a3f51eb24179192607d2 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Fri, 28 Jan 2022 00:54:55 +0100 Subject: [PATCH 1/2] rustdoc: no `shortcut` in `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 085679c8414 ("Use theme-adaptive SVG favicon from other Rust sites"), it is still there for the custom logo case. Signed-off-by: Miguel Ojeda --- src/doc/rustdoc/src/the-doc-attribute.md | 2 +- src/librustdoc/html/templates/page.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustdoc/src/the-doc-attribute.md b/src/doc/rustdoc/src/the-doc-attribute.md index a75b6d3893128..c5cc84022e389 100644 --- a/src/doc/rustdoc/src/the-doc-attribute.md +++ b/src/doc/rustdoc/src/the-doc-attribute.md @@ -59,7 +59,7 @@ This form of the `doc` attribute lets you control the favicon of your docs. #![doc(html_favicon_url = "https://example.com/favicon.ico")] ``` -This will put `` into your docs, where +This will put `` into your docs, where the string for the attribute goes into the `{}`. If you don't use this attribute, there will be no favicon. diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index baadd3c27b446..564731ab7354b 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -54,7 +54,7 @@ href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#} {%- endif -%} {%- if !layout.favicon.is_empty() -%} - {#- -#} + {#- -#} {%- else -%} {#- -#} From 30685ed754d398934c62ec9fb9aba0344dcf81de Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Fri, 28 Jan 2022 13:17:01 +0100 Subject: [PATCH 2/2] doc: no `shortcut` in `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.** Signed-off-by: Miguel Ojeda --- src/doc/favicon.inc | 2 +- src/doc/redirect.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/favicon.inc b/src/doc/favicon.inc index 8f881657bdc1a..9c330685209be 100644 --- a/src/doc/favicon.inc +++ b/src/doc/favicon.inc @@ -1 +1 @@ - + diff --git a/src/doc/redirect.inc b/src/doc/redirect.inc index 33e3860c2a434..2fb44be014515 100644 --- a/src/doc/redirect.inc +++ b/src/doc/redirect.inc @@ -1,2 +1,2 @@ - +