-
Notifications
You must be signed in to change notification settings - Fork 52
/
redirect.Rmd
23 lines (15 loc) · 812 Bytes
/
redirect.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# How to set a redirect {#redirect}
## Non GitHub pages site (e.g. Netlify) {#non-git-hub-pages-site-e-g-netlify}
Replace the content of the current website with a `index.html` and `404.html` files both containing:
```html
<html>
<head>
<meta http-equiv="refresh" content="0;URL=https://docs.ropensci.org/<pkgname>/">
</head>
</html>
```
## GitHub pages {#git-hub-pages}
You can setup the redirect from your main user gh-pages repository:
- create a new repository (if you don't have one yet): `https://github.com/<username>/<username>.github.io`.
- In this repository create a directory `<pkgname>` containing 2 files: a `index.html` and `404.html` file, which both redirect to the new location (see previous subsection).
- Test that `https://<username>.github.io/<pkgname>/index.html` now redirects.