17.2 Supporting files

Sometimes a template may require supporting files (e.g., images, CSS files, or LaTeX style files). Such files should be placed in the skeleton directory. They will be automatically copied to the directory where the new document is created. For example, if your template requires a logo and CSS style sheet, they can be put under the directory inst/rmarkdown/templates/my_template:

template.yaml
skeleton/skeleton.Rmd
skeleton/logo.png
skeleton/styles.css

We can refer to these files within the skeleton.Rmd file, e.g.,

---
title: "Untitled"
author: "Your Name"
output:
  html_document:
    css: styles.css
---

![logo](logo.png)

# Introduction

# Analysis

```{r}
knitr::kable(mtcars[1:5, 1:5])
```

# Conclusion