Skip to content

Redirects on the docs website

Barrie Byron edited this page Oct 12, 2023 · 6 revisions

Redirects happen in two ways:

File-based redirects

Because some users might bookmark their favorite docs pages, it's appropriate to use redirects.

However, the best practice is to update the *.mdx files using search and replace when the doc links are in the .mdx files.

Add redirects following the patterns in the docusaurus.config.js file.

Tips:

  • Do not introduce duplicate redirects. Search before you add.
  • Do not introduce circular redirects.
  • Build the docs locally to see the Vercel docs build errors. See [Debugging build errors in the docs README.

Permalink with redirect examples

       redirects: [
          {
            from: '/about-mina/overview',
            to: '/about-mina',
          },
          {
            from: '/architecture/scan-state',
            to: '/node-operators/scan-state',
          },
          {
            from: '/architecture/snapps',
            to: '/zkapps',
          },
          {
            from: '/snapps',
            to: '/zkapps',
          },
        ...

Global redirects

Global redirects are in vercel.json

Entries here apply a more "global" redirect that were useful when the legacy docs used to have to be something like docs.minaprotocol.com/en when we had different languages.

The redirect rule here is to redirect all /en links to remove it.

Clone this wiki locally