-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a favicon #379
Comments
Hi, to add a favicon in one of the entries of the top menu, you just specify an attribute "icon" for an entry of the navbar in the "_pkgdown.yaml" file in the root of your package. For example:
would give you an entry "home" in the navbar with just an icon, and an entry "faq" with both icon and text pointing to "faq.html" You can also put favicons wherever you want in an article by inserting in this case the "full html specification" of the favicon (instead than only its name) in the text of the corresponding Rmd. For example:
would render in the website with a "github" icon. HTH |
Thank you for your suggestion how to insert icons anywhere in the file. I did not know that and it will be helpful for me in the future 👍 At the moment as a temporary solution I wrote myself a function, which inserts HTML code, such as: <link rel="icon" href="favicon.png" /> into the the |
ah, well.... the names started with "fa fa", so I thought those where "favicons"... as you may have surmised I'm not really a web developer ! Sorry for the misunderstanding and glad it helped somehow nonetheless.... |
A favicon is automatically generated from the package logo; I've added a note to the docs. |
In my case, a favicon is indeed generated automatically but not visible when the webpage is loaded. Is there any thing I need to do so that the generated favicon is indeed used when the page is loaded? |
Same for me. |
I was having trouble until I read that. I found I needed to
Not a big deal once I read #379 (comment) and thought to try (2). |
@wlandau 's instructions got me most of the way there. The generated html is expecting the favicon files in |
I was struggling with getting this to work at work, and here is the solution that ended up working for me. This assumes you have a In your
This will get it to work on the home page of the site. To get it to work on the other pages as well, you need to make a copy of the
(Depending on exactly how things are configured, you might need to play around a bit with the folders there. It's called |
How is it possible to add a favicon to my
pkgdown
site automatically? E.g., through YALM settings.The text was updated successfully, but these errors were encountered: