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

render_site compatibility with Rmd params. #904

wants to merge 1 commit into from


Copy link

@zeehio zeehio commented Dec 4, 2016

This PR provides a solution to #903 and #892 as as a side effect.

@jjallaire I used "output_files" as you suggested. Feel free to suggest changes, although I do not have much more time to devote to this.


  • render_site understands the output_files field in the _site.yml. If output_files is missing
    it uses the Rmd file with the same name. Example of output_files field:
   src: "flights_analysis.Rmd"
     flight_type: "domestic"
   src: "flights_analysis.Rmd"
     flight_type: "international"
  • The output_files feature can be used as well to set as source for an html file a R script that will be spinned:
   src: "flights_analysis.R"
  • render_site also understands the autospin field in _site.yml. If autospin: true is set, render_site will render all R scripts spinning them first. (closes Use spin with render_site #892)

  • Tests have been enhanced a bit to cover these features and documentation has been added as well to the ?render_site man page.

I already signed the contribution agreement when I submitted my previous PR (#647)

Comments, patches and merges are very welcome

@zeehio zeehio force-pushed the feat_render_site_with_params branch from bcdb1a2 to fcdfc26 Compare April 4, 2019 09:29
render_site understands the `output_files` field in the `_site.yml` file to
describe which source file should an html file use and give Rmd parameters
if needed. (closes rstudio#903)

The output_files feature can be used as well to set as source for an html file
a R script that will be spinned.

This commit also adds a `autospin` field in `_site.yml` that, if set to `true`
will render all the `R` scripts spinning them first (closes rstudio#892)
@zeehio zeehio force-pushed the feat_render_site_with_params branch from fcdfc26 to ed1ab18 Compare April 4, 2019 09:37
Copy link
Contributor Author

zeehio commented Apr 4, 2019


Sorry for not coming back earlier, we are all a bit too busy I guess...

I rebased this rather old PR that offers the possibility to render Rmd files with parameters with render_site, as well as the option to autospin source R files into Rmd files.

Would you still be willing to review and merge this?


On a second thought, I want to review the PR. It was written long ago...

Copy link
Contributor Author

zeehio commented Apr 5, 2019

There is a breaking change in this PR, as it changes the generator$render function so the input argument can be interpreted as an output file. This may have many consequences, so I prefer to close this PR. The branch is there, so if you are interested in taking some things feel free to do so.

The autospin feature was nice, so I will try to create a new PR for that exclusively

@zeehio zeehio closed this Apr 5, 2019
@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.
None yet
None yet

Successfully merging this pull request may close these issues.

Use spin with render_site
1 participant