Skip to content

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

Answered by theNaut1lus
AlphaZetta asked this question in General
Discussion options

You must be logged in to vote

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 :slight_smile:

P.S: for assurance purposes i did google w…

Replies: 19 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet