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

Error for multiples outputs in render_site #793

Closed
jreduardo opened this issue Sep 1, 2016 · 2 comments · Fixed by #1177
Closed

Error for multiples outputs in render_site #793

jreduardo opened this issue Sep 1, 2016 · 2 comments · Fixed by #1177
Milestone

Comments

@jreduardo
Copy link

I create my webpages with rmarkdown, function render_site. But I have problems when I use more outputs in yaml. For example:

In _site.yml file

name: ""
output_dir: "."
output:
  html_document: default
  pdf_document: default
navbar:
  left:
    - text: Home
      href: index.html

In index.Rmd file

% My title
% EERJ

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax
for authoring HTML, PDF, and MS Word documents. For more details on
using R Markdown see <http://rmarkdown.rstudio.com>.

Thus, the function rmarkdown::render_site() generates the error below

Error in (function (toc = FALSE, toc_depth = 2, number_sections = FALSE,  : 
  unused arguments (lib_dir = "site_libs", self_contained = FALSE)

I suppose the problem is related to https://github.com/rstudio/rmarkdown/blob/master/R/render_site.R#L195, because the list in output_options is unused in different outputs ofhtml_document.

@yihui
Copy link
Member

yihui commented Oct 26, 2017

I have proposed a fix at #1177. You may test it with:

devtools::install_github('rstudio/rmarkdown#1177')

Here is a reproducible example: site.zip.

yihui added a commit that referenced this issue Oct 26, 2017
* fix #793: do not use output_options in default_site()

because these options do not work for output formats that do not support them, e.g. pdf_document; instead, temporarily patch the `html_document` format options in _site.yml during render()

* add a news item

* _site.yml is not necessarily under the current working directory (should be under `input`)
@github-actions
Copy link

github-actions bot commented Nov 3, 2020

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants