Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 6

How do you add a favicon to a GitHub page with a theme?

Solved! Go to Solution.

I'm trying to add a favicon to a GitHub page with the 'slate' theme but I don't know where to add it as it doesn't use traditional html.

5 Replies
Copilot Lvl 3
Message 2 of 6

Note:

It must not require terminal.

Solution
Copilot Lvl 3
Message 3 of 6

Re: How do you add a favicon to a GitHub page with a theme?

Hey @MCloverz,

Once you have generated the theme, then naviagate to the root directory, you will find an index.html file in your root directory.

after that i believe it should be very straight forward, just add a simple link tag like you would add in your normal static html website.

But just be sure not to put a slash in the beginning when defining the href attribute.

so for example

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

this assumes you are placing the .ico file in the root directory, if not then,

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

hope this helps you :)

 

P.S: for assurance purposes i did google what your query was exactly, linking the source from where i got the exact details: The Link

Copilot Lvl 3
Message 4 of 6

Re: How do you add a favicon to a GitHub page with a theme?

Thanks! I'll give it a try.

Copilot Lvl 3
Message 5 of 6

Re: How do you add a favicon to a GitHub page with a theme?

This still doesn't work as I am using a theme (index.md), not HTML (index.html).

Copilot Lvl 3
Message 6 of 6

Re: How do you add a favicon to a GitHub page with a theme?

Nevermind, I figured it out! I'll accept your answer as the solution as it'd probably help most.