Edward R. Mazurek Edward R. Mazurek - 4 months ago 8
CSS Question

How do I attach more than one stylesheet to an rmarkdown document?

If I'm creating a .rmd report and this is my example YAML, how do I attach another stylesheet to this report's output?

---
title: "Example Report"
author: "Cool guy 62"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
theme: null
css: 'style.css'
---

Answer

Place the multiple css files into a bracketed array like so:

---
title: "Example Report"
author: "Cool guy 62"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
  html_document:
    theme: null
    css: ['browserreset.css', 'style.css', 'C:/Users/coolguy62/webpages/styles/bootstrap-modified.css']
---
Comments