This is a template repository for adding content to the OxShef collaboration between University of Oxford and University of Sheffield. Please use this template if your site matches these criteria:
- The site will be written using RMarkdown files
- The site will make use of R output
The OxShef collaboration covers many different technologies and it might not be appropriate to use RMarkdown in all cases, in which case please do consider adding a new template repository so others can create similar subsites in the future.
Current websites in OxShef that use this template include:
- OxShef Charts: A guide to different visualisation options for visualising research data
At the last full-build of the template the following R packages were required to build this package:
library("tidyverse")
list.files(pattern = "Rmd", recursive = TRUE) %>%
map(., ~readLines(.x, warn = FALSE)) %>%
paste(collapse = "") %>%
str_extract_all("library\\([^()]+\\)") %>%
str_extract_all("\\([^()]+\\)") %>%
.[[1]] %>%
gsub("[^[:alnum:].]", "", .) %>%
unique()
#> Warning in stri_extract_all_regex(string, pattern, simplify = simplify, :
#> argument is not an atomic vector; coercing
#> [1] "tidyverse" "DT" "readxl" "visNetwork" "emo"
This template borrows heavily from the design of the rmarkdown.rstudio.com website, in order to use it effectively you must be aware of the following:
- Use the
_render-site.R
script to safely generate the website by knitting together all.Rmd
files in the root directory of the project - Modify
_site.yml
to change the globaly used CSS and which elements fromincludes/
are automatically included in all pages includes/
contains re-usable website elements as follows:includes/include_header.html
defines the horizontal navigation displayed at the top of each pageincludes/include_footer.html
defines the footer displayed at the bottom of each page
- Add new pages by duplicating the example-page.Rmd file
OxShef is a collaboration between the University of Oxford and University of Sheffield.
The contents of this website, text and code, are made available under both a CC-BY and BSD license.
This
work is licensed under a
Creative
Commons Attribution 4.0 International License.
Copyright 2017, University of Oxford and University of Sheffield