At the top of every RMarkdown file, you’ll see a YAML metadata header section enclosed by ---. By default, it will populate the file title, author, creation date, and output file type, but there are tons of ways to customize it to apply functions and formatting across your entire document. These options can vary by output file type. For .html files, see here and for .pdf files, see here.


For our A very important report on global UFO sightings and abductions .html document, we used the following yaml specifications:

---
title: "A *very* important report on global UFO sightings and abductions"
subtitle: "*(But mainly a lesson on using R Markdown and GitHub Pages to share your work)*"
author: Compiled on Tue Jun  8 20:40:45 2021 by Sam Csik & Juliette Verstaen"
output:
  html_document:
    code_folding: hide
    code_download: true
    toc: true
    toc_float: true
    theme: spacelab
editor_options: 
  chunk_output_type: console
---


Notice that we can specify both output and editor_options. Anything that we specify under output: applies to our knitted/rendered .html document, whereas specifying editor_options: alters RStudio’s default behaviors. For example, I prefer to see outputs rendered in the console when testing (rather than the default in-line renderings).


Other additions we’ve made are: