Skip to content

Commit c7580ea

Browse files
fix(docs): Update our version page to have good redirects (#3462)
1 parent b504a51 commit c7580ea

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

site/data/docs-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- '0.5'
1111
- '0.6'
1212
- group: v1.x
13-
baseurl: 'https://web.unified-design-system.orange.com/docs'
13+
baseurl: 'https://web.unified-design-system.orange.com/[brand]/docs'
1414
description: 'Current major release. Last update was v1.2.0'
1515
versions:
1616
- '1.0'

site/src/pages/[brand]/docs/versions.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function getStaticPaths() {
4242
'list-group-item list-group-item-action py-sm',
4343
isCurrentVersion && 'd-flex justify-content-between align-items-center'
4444
]}
45-
href={`${docsVersion.baseurl}/${version}/`}
45+
href={`${docsVersion.baseurl.replaceAll('[brand]', getConfig().brand)}/${version}/`}
4646
>
4747
{version}
4848
{isCurrentVersion && <span class="tag tag-accent">Latest</span>}

site/src/pages/docs/versions.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
import RedirectLayout from '@layouts/RedirectLayout.astro'
3+
import { getConfig } from '@libs/config'
4+
---
5+
6+
<RedirectLayout path={`/${getConfig().brand}/docs/versions/`} />

0 commit comments

Comments
 (0)