dexidp / website

Dex website
https://dexidp.io
Apache License 2.0
12 stars 64 forks source link

How to provider redirect for pages #161

Open nabokihms opened 8 months ago

nabokihms commented 8 months ago

The name of the page was changed. During https://github.com/dexidp/website/pull/156 we renamed the id-token page to the token page.

I'd like to have the ability to provide a redirect from the old page to not break previously worked links.

nabokihms commented 8 months ago

@nate-double-u hello! Can you help with one? It seems like the docs framework should have this capability out of the box.

nate-double-u commented 8 months ago

There's a couple ways of doing it, you're running on netlify, so I'd follow one of their methods: https://docs.netlify.com/routing/redirects/

etcd uses an index redirect file in layouts (https://github.com/etcd-io/website/blob/main/layouts/index.redirects), I think this needs an update in the config, but forgive me i don't recall which. That said, to start I think the [[redirects]] in the config is probably the easiest way (but it gets a little unmanageable after you have more than a couple redirects, which is why i tend to use the separate file.)