% 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}.
}
