-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Favicon displays locally but not on GH pages #190
Comments
Not sure where exactly the favicon code needs to be stored to also get displayed by GH pages. You can try to search in the pkgdown repo how it is handled there. Even if it would work, creating the slides again would overwrite the references to the favicon, wouldn't it? |
I can't help out much here, but I have used favicons in Rmd generated websites. Usually there is something in the yaml front matter like this:
Which then includes a link in the html output.
It seems like this is something that could be implemented in xaringan. |
Two suggestions: First, from browsing your repo, it seems like the favicon didn't make it into But if that doesn't work, then maybe the link tag isn't making it into In which case, I'm pretty sure that you can use output:
xaringan::moon_reader:
css: ["default", "shinobi", "dobbs.css"]
lib_dir: libs
includes:
in_header: header.html
nature:
... Btw, I've really been wanting to learn drake and your slides are 🔥🔥🔥 and thanks for opening this issue so I could discover them! 😂 |
Thanks for these great suggestions, all! @gadenbuie glad you're a fan of the slides :) Your point that GH pages probably doesn't see anything outside I tried copying the favicon to I could be wrong here but it doesn't seem like So off that, next tried specifying it as a Thanks @pat-s for the point about looking into how |
Hi @aedobbyn -- sorry for the run-around, but I do think my suggestion(s) will work! When you use I forked your slides and tested it out and the favicon is working! The important (and very small) change is in this diff. For reference, |
Omg wow nice! Thank you for solving this! Was that js added automatically or did you have to put it in by hand yourself? (I did)
|
Awesome, glad that worked for you too! Yeah, I noticed that js but I’m not sure where it came from. I don’t think it’s strictly necessary. I did install xaringan from github right before rendering... 🤷♂️ |
Oh yeah you're right, it's not necessary, probably just a result of your installing a different version of the package. Now that I look at it it should just make external links open in a new tab (I think? though mine actually don't so 🤷♀️) Anyway, thanks again, cheers! |
I have a very similar problem with the favicon displayed offline but not online.
in the Thanks a lot for any help! |
Hi @chrisdane, This issue is with xaringan and yours shows bookdown related. It would be better to have things organized in the right place. It is always better to follow issue guide and post in the right place, in a new topic if yours is not directly related. Also for questions, please use Stackoverflow and RStudio Community that are better suited. That being said, where did you found that adding this YAML field would work ? I don't think that this field is supported. Here is a recipe on how to add favicon for a html document: https://bookdown.org/yihui/rmarkdown-cookbook/favicon.html If you need further help, please open a thread in https://community.rstudio.com is the correct category so that we keep things organized and not mix discussion in one old issue here. Thank you. |
Thanks for your great work on this package!
Very small question, which might be a GitHub thing we can't do anything about.
I've got a presentation set up to pull from my
docs
directory. I added a favicon to the project root and it displayed when rendered locally in Chrome.However, it doesn't display on GH pages (second tab).
![no_favicon](https://user-images.githubusercontent.com/4908283/52139365-f4886f80-261d-11e9-803b-89e1a6057fce.jpg)
I tried adding some
link
tags which wasn't necessary for the favicon to display locally, but no dice.The text was updated successfully, but these errors were encountered: