Configure links and redirects for your site

Redirects

The redirects object allows you to redirect traffic from one path to another. You can also use regex within redirects.

docs.yml
1redirects:
2 - source: "/old-path"
3 destination: "/new-path"
4 - source: "/incorrect/path"
5 destination: "/correct/path"
6 - source: "/old-folder/:slug" # <- using regex
7 destination: "/new-folder/:slug"

By default, the redirects implement temporary (302) redirects. If you would like to implement permanent (301) redirects, you can set permanent: true.

docs.yml
1redirects:
2 - source: "/old-subdomain"
3 destination: "/new-subdomain"
4 permanent: true

You can add a link to an external page within your sidebar navigation with the following configuration:

docs.yml
1navigation:
2 - section: Home
3 contents:
4 - page: Introduction
5 path: ./intro.mdx
6 - link: Our YouTube Channel
7 href: https://www.youtube.com/
An external link within navigation