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

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@zeehio
Copy link
Contributor

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.

Highlights:

  • 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:
output_files:
 flights_domestic.html:
   src: "flights_analysis.Rmd"
   params:
     flight_type: "domestic"
 flights_international.html:
   src: "flights_analysis.Rmd"
   params:
     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:
output_files:
 flights_domestic.html:
   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 #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

render_site compatibility with Rmd params.
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 #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 #892)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment