-
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
Convert math in README #2263
Convert math in README #2263
Conversation
Hi Maelle, FYI I'm still unable to render Using devtools::check_rhub() today, I got a couple of notes: ❯ checking HTML version of manual ... [11s] NOTE ❯ checking for detritus in the temp directory ... NOTE I don't find a copy of lastMiKTeXException in my check_rub() results |
the fix is in this branch only for now :-) |
@maelle Pandoc's
This is kinda detrimental to the goal of #2249. 😐 Furthermore, I don't quite understand why the README is treated differently than articles/vignettes... pkgdown already includes MathJax assets, so it should really be possible to use the same approach to build both the README and articles/vignettes (where inline math is properly rendered), no? |
Good to know, thank you! I guess that if we keep this option, we'll need to add the URL then.
The big difference is that vignettes/articles are knit whereas the README is not. Now, it does not mean approaches can't be aligned somehow. 😅 |
Probably worth digging into how RMarkdown sets the |
@maelle can you please take another look at this? I just tweaked the way that you test the code, adding some future looking support to make it easier to modify existing pkgdown test sites. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
|
||
if (clone) { | ||
if (is.null(path)) { | ||
cli::cli_abort("Can only clone when {.arg path} is set.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why an else after an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this if
makes the logic most clear, but it doesn't matter.
@@ -40,6 +42,23 @@ local_pkgdown_site <- function(path = NULL, meta = NULL, env = parent.frame()) { | |||
desc$write(file = path(path, "DESCRIPTION")) | |||
|
|||
file_create(path(path, "_pkgdown.yml")) | |||
} | |||
|
|||
if (clone) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the argument name made me think a local Git clone would be involved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, yeah, copy
would be a better name. But I'll probably end up refactoring this into a couple of different functions, so I'm going to leave it for now.
Fixes r-lib#2261 Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
Fix #2261
See also #2262 (would better be done in a separate PR)
I got a bit stuck trying to test this as it was hard for me to catch the Pandoc error in a test (it appeared in the log but I could not catch it 😅) hence the new Pandoc option for making warnings failures.
In any case the whole point is adding
--mathjax
to the Pandoc call.