forked from r-lib/pkgdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_redirects.Rd
34 lines (30 loc) · 1.34 KB
/
build_redirects.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-redirects.R
\name{build_redirects}
\alias{build_redirects}
\title{Build redirects}
\usage{
build_redirects(pkg = ".", override = list())
}
\arguments{
\item{pkg}{Path to package.}
\item{override}{An optional named list used to temporarily override
values in \verb{_pkgdown.yml}}
}
\description{
If you change the structure of your documentation (by renaming vignettes or
help topics) you can setup redirects from the old content to the new content.
One or several now-absent pages can be redirected to a new page (or to a new
section of a new page). This works by creating a html page that performs a
"meta refresh", which isn't the best way of doing a redirect but works
everywhere that you might deploy your site.
The syntax is the following, with old paths on the left, and new paths or
URLs on the right.
\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{redirects:
- ["articles/old-vignette-name.html", "articles/new-vignette-name.html"]
- ["articles/another-old-vignette-name.html", "articles/new-vignette-name.html"]
- ["articles/yet-another-old-vignette-name.html", "https://pkgdown.r-lib.org/dev"]
}\if{html}{\out{</div>}}
If for some reason you choose to redirect an existing page make sure to
exclude it from the search index, see \code{?build_search}.
}