Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

favicon missing on all pages#3490

Answeredbymmistakes
nicolgit asked this question inQ&A
Discussion options

What happened?

I have added favicon.png in the main folder of the repo.

I have also updated _includes/head.html :nicolgit@1501dd8

the result is that if i openhttps://nicolgit.github.io I see the favicon on the browser tab, I am not able to see the same icon if I open any blog post (i.e.https://nicolgit.github.io/azure-hub-and-spoke-playground/)

Expected behavior

see the favicon icon ALSO on any blog post

Steps to reproduce the behavior

N/A

Other

No response

You must be logged in to vote

Yourfavicon path isn't correct, that's why it doesn't show up any of your post/pages and only the home.
You need to make it relative, which can easily be done by adding a preceding/ or using Jekyll'srelative_url filter.

Changeyour favicon line to this:

<linkrel="shortcut icon"type="image/png"href="{{ 'favicon.png' | relative_url }}">

Replies: 1 comment 2 replies

Comment options

Yourfavicon path isn't correct, that's why it doesn't show up any of your post/pages and only the home.
You need to make it relative, which can easily be done by adding a preceding/ or using Jekyll'srelative_url filter.

Changeyour favicon line to this:

<linkrel="shortcut icon"type="image/png"href="{{ 'favicon.png' | relative_url }}">
You must be logged in to vote
2 replies
@nicolgit
Comment options

problem resolved with your help, thank you!

@thinkhuman
Comment options

After a lot of experimenting and failing, I found that it should be (for me):
<link rel="shortcut icon" type="image/png" href="{{ '/assets/images/favicon.png' | relative_url }}">

NOT:
<link rel="icon" type="image/png" href="{{ '/assets/images/favicon.png' | relative_url }}">

Answer selected bymmistakes
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@nicolgit@mmistakes@thinkhuman
Converted from issue

This discussion was converted from issue #3487 on February 25, 2022 14:54.


[8]ページ先頭

©2009-2025 Movatter.jp