1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-tutorials.R
\name{build_tutorials}
\alias{build_tutorials}
\title{Build tutorials section}
\usage{
build_tutorials(pkg = ".", override = list(), preview = FALSE)
}
\arguments{
\item{pkg}{Path to package.}
\item{override}{An optional named list used to temporarily override
values in \verb{_pkgdown.yml}}
\item{preview}{If \code{TRUE}, or \code{is.na(preview) && interactive()}, will preview
freshly generated section in browser.}
}
\description{
learnr tutorials must be hosted elsewhere as they require an
R execution engine. Currently, pkgdown will not build or publish tutorials
for you, but makes it easy to embed (using \verb{<iframe>}s) published tutorials.
Tutorials are automatically discovered from published tutorials in
\code{inst/tutorials} and \code{vignettes/tutorials}. Alternatively, you can
list in \verb{_pkgdown.yml} as described below.
}
\section{YAML config}{
To override the default discovery process, you can provide a \code{tutorials}
section. This should be a list where each element specifies:
\itemize{
\item \code{name}: used for the generated file name
\item \code{title}: used in page heading and in navbar
\item \code{url}: which will be embedded in an iframe
\item \code{source}: optional, but if present will be linked to
}
\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{tutorials:
- name: 00-setup
title: Setting up R
url: https://jjallaire.shinyapps.io/learnr-tutorial-00-setup/
- name: 01-data-basics
title: Data basics
url: https://jjallaire.shinyapps.io/learnr-tutorial-01-data-basics/
}\if{html}{\out{</div>}}
}
\seealso{
Other site components:
\code{\link{build_articles}()},
\code{\link{build_home}()},
\code{\link{build_llm_docs}()},
\code{\link{build_news}()},
\code{\link{build_reference}()}
}
\concept{site components}
|