-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Icon hyperlinks no longer visible in R markdown using YAML html_document #1924
Comments
I don't really know why it worked before but it seems this is a Pandoc related issue when producing self_contained document. in self contained mode, this will be transformed to be integrated in the html file source code <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"> and it seems that does not play well with fontawesome. You can set If you are not bound to version 5.15.1 you used above, you can also use the fontawesome dependency included with rmarkdown bu using this in your document. ```{r setup, include=FALSE}
htmltools::tagList(rmarkdown::html_dependency_font_awesome())
``` The version is 5.1.0 I think. And It seems to work. Also which version of Pandoc are you using ? |
Thanks for the response @cderv.
Adding the following setup did solve the issue.
I did not have to update my header/footer.html files, but to remove redundancy or potential confusion, I removed the following:
|
This should be self_contained: FALSE if you use it the yaml header under
Yes I forgot to mention that. Good to know that it works correctly with this. |
Of course, thanks for the correction. |
As mentioned on Oct. 15, 2020, using the following worked, but 8 days later, after nothing has changed in the rmd file, the icons are once again missing. Any suggestions? YAML
in combination with
|
As mentioned on Oct. 15, 2020, using the following worked, but 8 days later, after nothing has changed in the rmd file, the icons are once again missing. Any suggestions? YAML
in combination with
|
Did you ever get a fix on this? Having the same issue. Didn't change code bu fa-icons are now missing from knitted files. |
Unfortunately, no. That's why I reopened the issue, but it hasn't gotten any traction. |
Hi! I have the exact same problem, I've being going around the internet for ours now. My .yaml file looks something like this.
Pretty simple, the funny thing is that the first icon shows but not the other ones, but the links are still there because when you put the cursor you can actually click on them. Thanks a lot! |
@jsaraviadrago Be before changing your YAML, can you try #1994 to see if it works ? remotes::install_github("rstudio/rmarkdown#1994") @a-brasch could this be related to your issue ? Are you using specific icons ? |
Thanks for the response @cderv! My issue also seems to have been related to the R Markdown solution you linked to. I have not changed anything since my Oct. 23, 2020 post (YAML, header HTML, and code snippet below) and the icons now appear as expected when knit. I am using brand icons and my html was using the 'fab' prefix based on my reference to font awesome v5. As posted above on Oct. 15, adding the following setup solved the issue.
Thanks again for the help! My YAML looks like this:
My header.html file looks like this:
My r setup code snippet looks like this:
|
Great News! Just to clarify, does it work now for you with #1994 installed or not ? With the PR or without the PR ? Thanks. |
I actually didn't make any changes and it now works as expected. I'm assuming I've updated packages since last Oct., but I didn't do any specific installation related to #1994. Sorry, what is "PR"? |
OK great. That means your issue was fix by something else. This is what I wanted to know. I'll close this then.
Pull Request. It is the way to submit some changes to a github repository |
I have the same issue: icon hyperlinks for font-awesome have suddenly disappeared in knitted HTML documents. I've tried adding the suggested I've found that editing the generated HTML file and manually adding My current setup is identical to #1924 (comment) (i.e. a header/footer html file includes:
|
@combiz can you open a new issue by sharing an example of what is not working for you ? Also please, see the new fontawesome package (https://github.com/rstudio/fontawesome) : it has a more up to date version of fontawesome for now than the html dependency in rmarkdown |
Thanks @cderv, the fontawesome package was just the trick. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
I previously had success adding headers and footers to my R markdown HTML files using guidance found here: Pimp my RMD. No changes have been made to my header.html, but now the icon hyperlinks are no longer visible when knit via RStudio. I confirmed that the URL is still valid. The hyperlink via "Author Name" is still visible. When the header.html file is opened in Chrome, the hyperlink icons are visible and valid. Why would the hyperlink icons no longer be visible in the markdown HTML?
I posted this same question on stackoverflow and the R Community, but no answers to-date.
Examples included below and a zip file containing an .rmd, header.html, footer.html, and knit html file is attached. As you can see from this link, the icons and hyperlinks used to be visible.
html_header_icons_issue.zip
Thanks for any insight,
Alex
My YAML looks like this:
My header.html file looks like this:
By filing an issue to this repo, I promise that
xfun::session_info('rmarkdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rmarkdown')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: