library( fs) library( here) library( citr) library( knitr) library( tufte) library( tidyverse) # invalidate cache when the tufte version changes knitr::opts_chunk$set( eval = FALSE, include = FALSE, echo = FALSE, tidy = FALSE, cache.extra = packageVersion('tufte')) knitr::opts_knit$set( root.dir = normalizePath("./")) options(htmltools.dir.version = FALSE)
# create a bib file for the R packages used in this document knitr::write_bib(c( "base", "rmarkdown", "tidyverse", "fs", "here", "citr"), file = "libpkg.bib")
# # only first and second-level headings (that is, # and ##) # # when you want a margin figure, all you need to do is the # chunk option fig.margin = TRUE # # use ```{marginfigure, echo = TRUE} # to put uotput of chunk in margin. # use simple syntax, # like **bold** and _italic_ text, # but please refrain from using footnotes, citations, # or block-level elements (e.g. blockquotes and lists) # there # # arrange for figures to span across the entire page # by using the chunk option fig.fullwidth = TRUE. # # options related to figures can still be used, # such as fig.width, fig.cap, out.width, and so on. # For full width figures, usually fig.width is large # and fig.height is small. # In the above example, the plot size is "10×2" # # Any use of a footnote will automatically be # converted to a sidenote. ex. ^["this is a sidenote"] # # citations will be shown in sidemargin @base el @[base] #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.