Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple link elements with rel=icon #76

Merged
merged 5 commits into from
Jul 21, 2020
Merged

Commits on Jul 21, 2020

  1. Handle multiple link elements with rel~=icon

    It is very possible—even recommended—that there are multiple icons and if we're
    going to check that they actually exist, we should fallback to the other images listed.
    
    e.g.:
    
    ```html
    <link rel="icon" type="image/png" href="https://cdn.yourwebsite.com/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="https://cdn.yourwebsite.com/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="https://cdn.yourwebsite.com/favicon-96x96.png" sizes="96x96">
    ```
    
    There is a subtle functionality change here in that the element matching
    `head > link[rel="shortcut icon"]` will no longer be checked first, but that
    isn't important, nor should it be. That said, not checking for
    `rel="shortcut icon"` first could also be an improvement since its usage isn't
    quite correct or modern:<sup>[\[1\]][1]</sup>
    
    > For [historical reasons][2], the HTML specification [now allows][3] the use
    > of `shortcut` as a link relation if it’s immediately followed by a single
    > U+0020 space character and the `icon` keyword.
    
      [1]:https://mathiasbynens.be/notes/rel-shortcut-icon
      [2]:https://www.w3.org/Bugs/Public/show_bug.cgi?id=12695
      [3]:https://html.spec.whatwg.org/multipage/semantics.html#rel-icon
    whymarrh committed Jul 21, 2020
    Configuration menu
    Copy the full SHA
    3e3a426 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b58dda2 View commit details
    Browse the repository at this point in the history
  3. Return the href

    whymarrh authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    34d7dc8 View commit details
    Browse the repository at this point in the history
  4. Update siteMetadata.js

    whymarrh authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    6dc275a View commit details
    Browse the repository at this point in the history
  5. Update siteMetadata.js

    whymarrh authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    67de151 View commit details
    Browse the repository at this point in the history