1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/website
Thomas Heartman 89c6c09db3
docs: add /docs redirects to _all_ redirect paths (#2839)
## What

For each defined doc redirect path (that doesn't start with `/docs/`),
this PR adds an additional redirect that starts with `/docs`. The rest
of the path is otherwise identical.

For instance, if we have a redirect that goes from `/user_guide/x`, then
this change will ensure that we also have redirect that goes from
`/docs/user_guide/x`.

## Why

As reported by Roman, we've had some 404s recently when people have
tried to access pages that used to exist (wayyyy back) and that used to
redirect.

The reason these redirects stopped working is that we changed the url
structure recently. Before then, the `createRedirects` function would go
and create redirects that started with `/docs/` for all the paths that
required it. However, now that we've changed the structure of the URLs,
a blanket implementation like that won't work anymore.

Luckily, though, we already have all the redirects for pages we have
moved (just not redirecting from the `/docs/...` paths), so we can map
over the paths and add the missing redirects.
2023-01-05 21:47:04 +01:00
..
.storybook
docs Docs(fix): fix broken link to sdk-generator ADR (#2838) 2023-01-05 14:50:47 +00:00
src docs: Use Go readme (#2816) 2023-01-05 09:47:49 +00:00
static
.gitignore
babel.config.js
clean-generated-docs.js
docusaurus.config.js docs: add /docs redirects to _all_ redirect paths (#2839) 2023-01-05 21:47:04 +01:00
package.json docs: Use Go readme (#2816) 2023-01-05 09:47:49 +00:00
readme-fns.js docs: Use Go readme (#2816) 2023-01-05 09:47:49 +00:00
README.md
sidebars.js docs: Use Go readme (#2816) 2023-01-05 09:47:49 +00:00
tsconfig.json
yarn.lock docs: Use Go readme (#2816) 2023-01-05 09:47:49 +00:00

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

yarn install

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.