forked from r-lib/usethis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuse_vignette.Rd
44 lines (39 loc) · 1.41 KB
/
use_vignette.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vignette.R
\name{use_vignette}
\alias{use_vignette}
\alias{use_article}
\title{Create a vignette or article}
\usage{
use_vignette(name, title = name, type = c("rmarkdown", "quarto"))
use_article(name, title = name, type = c("rmarkdown", "quarto"))
}
\arguments{
\item{name}{Base for file name to use for new vignette. Should consist only
of numbers, letters, \verb{_} and \code{-}. Lower case is recommended.}
\item{title}{The title of the vignette.}
\item{type}{One of \code{"quarto"} or \code{"rmarkdown"}}
}
\description{
Creates a new vignette or article in \verb{vignettes/}. Articles are a special
type of vignette that appear on pkgdown websites, but are not included
in the package itself (because they are added to \code{.Rbuildignore}
automatically).
}
\section{General setup}{
\itemize{
\item Adds needed packages to \code{DESCRIPTION}.
\item Adds \code{inst/doc} to \code{.gitignore} so built vignettes aren't tracked.
\item Adds \verb{vignettes/*.html} and \verb{vignettes/*.R} to \code{.gitignore} so
you never accidentally track rendered vignettes.
}
}
\examples{
\dontrun{
use_vignette("how-to-do-stuff", "How to do stuff")
}
}
\seealso{
The \href{https://r-pkgs.org/vignettes.html}{vignettes chapter} of
\href{https://r-pkgs.org}{R Packages} and the \href{https://quarto-dev.github.io/quarto-r/articles/hello.html}{Quarto vignettes} reference.
}