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
Closed

pandoc warning during exercise knit #154

jjallaire opened this issue Mar 26, 2018 · 3 comments

Comments

@jjallaire
Copy link
Member

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
Copy link
Member

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
Copy link
Member Author

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

@jcheng5
Copy link
Member

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants