-
Notifications
You must be signed in to change notification settings - Fork 287
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
Badge handling #195
Comments
Intriguing syntax but it's not working for me when primary image is specified the way our svg badges are. <object data="nope.png" style="width:42px;height:42px;border:0;">
<img src="kitten.jpg" alt="Live badge unavailable." style="width:42px;height:42px;border:0;" >
</object>
from https://stackoverflow.com/questions/10772346/display-alternate-image I can get it to work if the remote badge is png, so maybe there is hope? |
A previous discussion of the bad interaction btw specific version of pandoc and shields.io, resolved for codecov specifically by not using shields.io: #36 |
More wide-ranging badge discussion here: ropensci/unconf17#58 |
Interesting input from Pandoc maintainer here, a thread about relaxing the self-containedness of html previews of md documents: rstudio/rmarkdown#1238 (comment)
Perhaps we could incorporate the badges this way? I just tried with two different variations on the badge syntax (putting the <a href="https://travis-ci.org/r-lib/usethis">
<img src="https://travis-ci.org/r-lib/usethis.svg?branch=master" alt="Travis build status" data-external="1"></a>
<a href="https://codecov.io/github/r-lib/usethis?branch=master" data-external="1">
<img src="https://codecov.io/gh/r-lib/usethis/branch/master/graph/badge.svg" alt="Coverage status"></a> Neither works 😞. I get this failure when offline:
so more investigation needed. |
I experience the same issues. |
@methodds If you can, you should upgrade Pandoc. That should clear up most badge issues. I'm leaving this open, because it would be nice to have a strategy that allowed |
Thanks for the hint, but unfortunately I still have the problem even with the latest pandoc version (2.1.1) :(
|
When I render README, I get:
Why do I have For me: packageVersion("rmarkdown")
#> [1] '1.8' Is this project and README on GitHub somewhere I can see? |
Thank you for helping me out :) Yes, the project is on github:
Updating rmarkdown and its dependencies changed
Here is my
|
|
But the badge does exist: https://www.r-pkg.org/badges/version/stminsights. |
Wow... I removed the CRAN badge before, but this didn't work, probably because of the old pandoc version. Now it does, thank you! So basically there is no way to show a "not yet on CRAN" badge on github? This would surprise me because patchwork for instance does have the badge on github and it seems to be created with a
|
There is. You should always be able to render IME these Pandoc errors are only about creating the html preview for your local enjoyment. Caveat: that is not at all obvious -- it's easy to think that you have failed to knit to |
I see, thanks, but as least for me this still does not solve issues related to preparations for a CRAN submission. If I use
This does not happen if I remove the CRAN badge (and then of course the HTML preview also works). |
This is highly suggestive that you don't have the most recent version of rmarkdown. I also have a suspicion that rmarkdown may be finding an older version of Pandoc. You might want to place |
This is output generated by rendering my README.Rmd and adding syntax as you suggested:
It seems like rmarkdown and pandoc versions are both up to date. |
Then I'm afraid I do not know what's going on. I note that you originally had trouble with the CRAN badge, but the most recent error is about Travis, in case that helps your troubleshooting. Perhaps that was just intermittent bad luck. |
The most recent error is always about the CRAN badge or the badge that comes after the CRAN badge. This is another run:
Anyway, thank you for trying to help me multiple times! If I find a solution, I let you know. |
@cschwem2er have you figured it out? I have the same R CMD CHECK warnings at the CRAN infrastructure for incoming checks you outlined and I don't know what to do. Neither travis, appveyor or r-hub give me these warnings. Did removing all badges help? |
Unfortunately I still do not have a solution other than removing the badges for the CRAN submission and readding them manually afterwards :/ |
Thanks. Ok, but it has worked for styler 1.1.0 🍾. |
I think this is both largely resolved and outside the scope of usethis. |
Check if any of your badges names (if files) gets matched by your patterns in .RbuildIgnore |
Is there anything that could be done here or in a badge package to make badge-handling in the README nicer? For example, a better failure mode when a badge is unavailable.
The text was updated successfully, but these errors were encountered: