nus-cs2103-AY2021S2 / forum

10 stars 0 forks source link

Anyone has any idea how to add favicons to our UGDG websites? #294

Open yhtMinceraft1010X opened 3 years ago

yhtMinceraft1010X commented 3 years ago

image

I tried putting it in head.html but it didn't work. Am I doing something wrong?

tjtanjin commented 3 years ago

Hello! Try specifying the full path in the href attribute instead (this made a difference when testing on a local server vs production).

yhtMinceraft1010X commented 3 years ago

Thanks, I don't feel safe using full path, so what I did was this:

  <link rel="shortcut icon" href="{{ "/images/modulebookfavicon.ico" | relative_url }}">
  <link rel="icon" href="{{ "/images/modulebookfavicon.ico" | relative_url }}">

It worked when I set up a new webpage on my personal fork although I've yet to merge this into the team repo. I'm not sure if this is the most elegant solution though, so I'll leave this issue open for discussion.

jessen11 commented 3 years ago

For adding favicon in the Github Pages, I found this tutorial helpful. https://techagileleaders.com/how-to-add-a-favicon-to-github-pages-403935604460

Thanks, I don't feel safe using full path, so what I did was this:

  <link rel="shortcut icon" href="{{ "/images/modulebookfavicon.ico" | relative_url }}">
  <link rel="icon" href="{{ "/images/modulebookfavicon.ico" | relative_url }}">

It worked when I set up a new webpage on my personal fork although I've yet to merge this into the team repo. I'm not sure if this is the most elegant solution though, so I'll leave this issue open for discussion.

I think this solution is also okay, maybe you can report how it works here, since I am also interested to add favicons into our github pages, if time permits :D