Skip to content

rnabioco/bmsc-7810-pbda

Repository files navigation

bmsc-7810-pdba

Practical biological data analysis

website

https://rnabioco.github.io/bmsc-7810-pbda/

adding content

We will use pull requests to add content to avoid clobbering the main branch. When generating new content, make branch (e.g. class4) synced with main. Then change to this branch for developing new content.

The site is being built as a distill blog. This makes it easy to add new class content as blog posts, which don't require rerendering previous Rmarkdowns.

To make a new post, follow the distill blog tutorial

Essentially, run create_post which will create a subdirectory and template Rmarkdown in _posts.

library(distill)
create_post("class-1", draft = TRUE)

Navigate to the Rmarkdown in the _posts subdirectory, add content, then knit and check output html file. If the content looks ready to publish, remove draft: True from the header, add the post directory to the list of posts in the yaml header of classes.Rmd, reknit the post, then rebuild the site using the Build website button under the Build tab in Rstudio. Build website will update the classes listed in the Classes tab, unless draft: True is set. Also note that Build website will copy all files in the project into docs unless you list the files/directories to ignore in the _site.yml.

E.g. exclude: ["data"]

You can preview the website by viewing the index.html in the docs directory.

Once satisfied with the content, commit the .Rmd, the .html, the ..._files directory associated with the html, and associated files necessary for knitting the Rmd. The docs directory will be generated by a github action so it is not necessary to commit.