Search code examples
webjekyllfavicon

Jekyll Site Not Showing Favicon


My favicon is not displaying for my Jekyll site. I use the minima theme and followed all the instructions in the template for adding the favicon.

Expectation

Expectation Image

Reality

Reality Image

When I run the Jekyll site locally, the favicon displays. This is my header code included in the header.html file for a similar project that is having the same issue


    <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      {%- seo -%}
      <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
      <link rel="shortcut icon" type="image/x-icon" href="/assets/favicon.ico">
      {%- feed_meta -%}
      {%- if jekyll.environment == 'production' and site.google_analytics -%}
        {%- include google-analytics.html -%}
      {%- endif -%}
    </head>


Solution

  • hi Nazchanel i think you have to add a absolute address on that

    you are using

    <link rel="shortcut icon" type="image/x-icon" href="/assets/favicon.ico">

    please try this may helps you

    <link rel="icon" type="image/x-icon" href="{{site.baseurl}}/assets/favicon.ico" />

    if this will not work then add

    <link rel="icon" type="image/x-icon" href="www.YourDomain.com/assets/favicon.ico" />