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
Fix icon path #497
Fix icon path #497
Conversation
_layouts/default.html
Outdated
| @@ -5,7 +5,7 @@ | |||
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |||
| <title>{{ page.title }}</title> | |||
| <meta name="viewport" content="width=device-width"> | |||
| <link rel="icon" type="image/x-icon" href="../images/logo.png"/> | |||
| <link rel="icon" type="image/x-icon" href="images/logo.png"/> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that @sivaraam suggested either /images/logo.png or just adding a link to it or a copy of it named favicon.ico. But this is doing something else. Is there a reason why you think Kaartic's suggestions will not work, or what you are doing is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken, this is how it works:
_layouts
L default.html
images
L logo.png
And what I did then - it worked correctly, but I don't know why: rev_news / rev_news.md do not work.
But here's what confused me:
#496 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, paths in the layout are referenced relatively from the path where the layout is used. So, your relative reference worked properly for the index and about pages but not for Rev News pages.
That's why I suggested using an absolute path instead.
The favicon.ico file should be placed only at the ROOT of the repository. No need to add it to sub-folders. That way the favicon is automatically served to the browser upon request.
On some research though, it looks like using the link tag is the standardized way to serve website icons [ref]. See suggestion about how to do that below.
_layouts/default.html
Outdated
| @@ -5,7 +5,7 @@ | |||
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |||
| <title>{{ page.title }}</title> | |||
| <meta name="viewport" content="width=device-width"> | |||
| <link rel="icon" type="image/x-icon" href="../images/logo.png"/> | |||
| <link rel="icon" type="image/x-icon" href="images/icons/favicon.ico"/> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going the favicon.icon route, you could just remove the whole link tag altogether. It isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could fix this link tag to make it work with the logo by using an absolute link as follows:
| <link rel="icon" type="image/x-icon" href="images/icons/favicon.ico"/> | |
| <link rel="icon" type="image/x-icon" href="/images/logo.png"/> |
|
Hello. Sorry for the lack of feedback. |


Fix #496
Not sure. Check this, please.