How to include favicon for each page of a gh-pages website

I have a website, intended mostly as a portable repository of notes on statistics (http://rinterested.github.io/statistics/index.html), and it includes a favicon, which displays nicely on the tab of the browser for the index page, because I included it in the html of the home page.

However, all the other pages are generated automatically by “knit HTML” in RStudio, and when I try to include some reference to the favicon, the knitting process crashes. As a result, the favicon is not visible on any other pages within the site.

How can I solve this problem?

You probably want to look into Layouts in Jekyll, here’s a pretty well explained tutorial on how to take similar pages and apply the same layout to multiple pages http://jekyll.tips/jekyll-casts/layouts/

Thank you. From within GitHub, I don’t see any connections to Jekyll. I remember that at some point I had the option to kind of default to some layouts or themes provided by Jekyll, but I never did. Now I see that the pages are compiled by Jekyll in some fashion, but I can’t find the link to modify thinks from within Jekyll. Any tips?

How are you editing this content? I see that your files are being created from a .rmd file to .html, I’m not sure what editor you’re using to do that but that’s what Jekyll can do as well with markdown. You may need to change quite a bit of your current process in order to utilise it. Would it be worth you changing?

I am simply using RStudio, which has a Knit option to automatically format .Rmd files into .html, ready to commit and push.

Hmm, you’ll probably have to move all your Jekyll which will be long and tedious. Have you tried copying the favicon.ico file to the repo? If you have it at root level it should be applied the entire site