This site
This page describes the technologies and tools we use for generating this site.
RStudio
Rick Gilmore drafted the site using the RStudio Integrated Development Environment (IDE) on his desktop computer. Penn State supports RStudio Server which allows users to run RStudio in a web browser (https://rstudio.tlt.psu.edu). However the versions of R seem out-of-date, and this service is only available to users whose computers are behind the PSU firewall (connected via GlobalProtect).
bookdown
The R package bookdown
generates the site.
We use the Bootstrap format.
To view specific parameters, see the src/_bookdown.yml
, src/_output.yml
, and src/index.Rmd
files.
renv
We use the renv
package to manage package dependencies.
In most cases, to render the site anew, the user should do the following:
- Install
renv
viainstall.packages('renv')
. - Execute
renv::restore()
from the R console to install local copies of the required packages.
R Markdown
Most of the content of the site is written in R Markdown, an extension of Markdown.
Image files are located in src/include/img
; CSS style sheets are in src/include/css
; and BibTex-formatted reference files are in src/include/bib
.
Any “child” R Markdown files needed can be stored in src/include/rmd
.
GitHub
We use git for version control and push changes to GitHub at https://github.com/penn-state-open-science/bootcamp-2023.
GitHub has a ‘pages’ feature that will automatically turn HTML and associated files into a hosted website with a convenient URL. In our case, the URL is https://penn-state-open-science.github.io/bootcamp-2023/.
File structure
- All source documents are under
src/
. - The rendered website is in
docs/
. - Files related to package management are located in
renv/
Editing and rendering
A typical editing and site rendering cycle goes like this:
- Edit the relevant
*.Rmd
files insrc/
. - Save the changed files.
- Render the site via
bookdown::render_book('src')
. - View the site locally in a browser by opening
docs/index.html
.
TODO: Incorporate GitHub actions to generate the site. This would save a step.