marinebon / infographiqR

R functions for creation of interactive intelligent infographics, ie infographiq
https://marinebon.github.io/infographiqR
MIT License
11 stars 2 forks source link

+ Rmarkdown template(s) for infographiq website (& modals) #64

Closed bbest closed 3 years ago

bbest commented 3 years ago

It would be pretty cool if we getting started with an infographiq website could be as simple as navigating from RStudio's menu File > New File > Rmarkdown... From Template:

See: R Markdown Document Templates

bbest commented 3 years ago

Or perhaps RStudio menu File > New Project... New Directory RStudio Project Templates are better suited for multiple files:

superjai commented 3 years ago

Hey @bbest - completed.

I created a new function in render_rmd.R called infographiq_template() that copies the template version of the website to the desired directory.

This template is located in the directory: infographiqR/inst/template_website/. Please note that there is a very similarly named directory in inst called site_template. I don't know what this directory is and it is quite old (latest changes are 3 years old) - I am guessing that it should be deleted.

This template site is extremely similar to the example site in the guide I wrote, so that my guide can be used in this context.

There is also a file in the directory infographiqR/inst/rstudio/templates/project/ called infographiq_template.dcf. This .dcf file adds the infographiq_template() functionality to the New Project screen in RStudio:

Screen Shot 2021-07-26 at 3 10 18 AM

In order to see this in the New Project screen in your version of RStudio, you'll need to: 1) update your installation of infographiqR, 2) close RStudio, 3) reopen RStudio.