Skip to content

Instantly share code, notes, and snippets.

@andrewheiss
Last active April 24, 2020 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewheiss/af96fdc9b7f6deddb84d7c92406e3c4d to your computer and use it in GitHub Desktop.
Save andrewheiss/af96fdc9b7f6deddb84d7c92406e3c4d to your computer and use it in GitHub Desktop.
.
├── slide-adventures.Rproj
├── slides
│   └── test.Rmd
└── styles
└── test.css
# This will stream/cast a specific Rmd file. The cast_from argument makes it so the server
# that is created is based in your root project directory, so it can see the CSS
xaringan::inf_mr("slides/test.Rmd", cast_from = ".")
# This will stream/cast the Rmd file you have currently open (the default if you don't specify
# a file path). The case_from argument has to be .. so that xaringan uses the root of the
# project, which is now a level back
xaringan::inf_mr(cast_from = "..")
.yellow {
background-color: #F5C710;
}
---
title: "Example thing"
output:
xaringan::moon_reader:
lib_dir: libs
seal: false
css: ["default", "../styles/test.css"]
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
# This is a slide.
Some content here.
---
class: yellow
# This is also a slide
It is yellow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment