Skip to content
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

pandoc warning during exercise knit #154

Closed
jjallaire opened this issue Mar 26, 2018 · 3 comments

Comments

@jjallaire
Copy link
Member

@jjallaire jjallaire commented Mar 26, 2018

I am seeing this when running exercises:

[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata.
  Falling back to 'exercise.knit.utf8'

We render exercises using a couple of passes here:

https://github.com/rstudio/learnr/blob/master/R/exercise.R#L199-L244

@yihui Can you recommend the right workaround to suppress this warning? (or do I recall a recent commit to rmarkdown that would get rid of it globally?)

@yihui

This comment has been minimized.

Copy link
Member

@yihui yihui commented Mar 26, 2018

Adding pandoc_args = c("--metadata", "pagetitle=PREVIEW")) to html_fragment() here should fix it (PREVIEW here can be an arbitrary non-empty string):
https://github.com/rstudio/learnr/blob/master/R/exercise.R#L207-L209

@jjallaire

This comment has been minimized.

Copy link
Member Author

@jjallaire jjallaire commented Mar 26, 2018

Okay, @bborgesr can you take a shot at that?

@jcheng5

This comment has been minimized.

Copy link
Member

@jcheng5 jcheng5 commented Mar 26, 2018

@jjallaire She's out this week. I'll submit a PR momentarily.

jcheng5 added a commit that referenced this issue Mar 26, 2018
Fixes this warning:

[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata.
  Falling back to 'exercise.knit.utf8'
@jcheng5 jcheng5 closed this in cf6430c Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.