Skip to content

Commit e03826d

Browse files
committed
feat(#3511): add links to old v1 docs
1 parent 18568b5 commit e03826d

5 files changed

Lines changed: 29 additions & 3 deletions

File tree

docs/astro.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ const workspaceRoot = path.resolve(__dirname, "..");
1212
export default defineConfig({
1313
root: ".",
1414
outDir: "../dist/docs",
15+
redirects: {
16+
"/components/[version]/[...slug]": "/components/[...slug]",
17+
"/components/circular-progress-indicator": "/components/circular-progress",
18+
"/components/file-uploader": "/components/file-upload-input",
19+
"/components/header": "/components/app-header",
20+
"/components/icons": "/components/icon",
21+
"/components/linear-progress-indicator": "/components/linear-progress",
22+
"/components/notification-banner": "/components/notification",
23+
"/components/radio": "/components/radio-group",
24+
"/components/skeleton-loader": "/components/skeleton",
25+
"/design-tokens": "/tokens",
26+
"/get-started/support": "/support",
27+
"/examples/show-multiple-actions-in-a-table": "/examples/show-multiple-actions-in-a-compact-table",
28+
},
1529
build: {
1630
chunkSizeWarningLimit: 1000,
1731
},

docs/src/components/MobileHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function MobileHeader() {
4040
height="28"
4141
className="mobile-header__logo"
4242
/>
43-
<span className="mobile-header__title">Design system</span>
43+
<span className="mobile-header__title">Design System</span>
4444
</a>
4545
</div>
4646
<div className="mobile-header__right">

docs/src/components/nav/ParentMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function ParentMenu({
141141
return (
142142
<>
143143
<GoabxWorkSideMenu
144-
heading="Design system"
144+
heading="Design System"
145145
url="/"
146146
open={isOpen}
147147
onToggle={onToggle}

docs/src/pages/components/[slug].astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const configurations = getComponentConfigurations(slug);
4545
4646
// GitHub issues URL for this component
4747
const githubIssuesUrl = `https://github.com/GovAlta/ui-components/issues?q=is%3Aissue+is%3Aopen+label%3A%22${encodeURIComponent(component.data.name)}%22`;
48+
49+
const oldDocsUrl = `https://v1.design.alberta.ca/components/${slug}`;
4850
---
4951

5052
<ComponentPageLayout
@@ -101,6 +103,10 @@ const githubIssuesUrl = `https://github.com/GovAlta/ui-components/issues?q=is%3A
101103
API documentation is automatically extracted from the component source code.
102104
</goa-callout>
103105
)}
106+
107+
<goa-link size="small" trailingicon="open">
108+
<a href={oldDocsUrl} target="_blank" rel="noopener noreferrer">View old component docs</a>
109+
</goa-link>
104110
</TabContentWrapper>
105111
</goa-tab>
106112

docs/src/pages/examples/[slug].astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ function formatComponentName(component: string): string {
6363
.map((word, i) => i === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word)
6464
.join(' ');
6565
}
66+
67+
const oldDocsUrl = `https://v1.design.alberta.ca/examples/${slug}`;
6668
---
6769

6870
<ExamplesPageLayout
@@ -112,6 +114,10 @@ function formatComponentName(component: string): string {
112114
</div>
113115
</section>
114116
)}
117+
118+
<goa-link size="small" trailingicon="open">
119+
<a href={oldDocsUrl} target="_blank" rel="noopener noreferrer">View old example docs</a>
120+
</goa-link>
115121
</article>
116122
</ExamplesPageLayout>
117123

@@ -189,7 +195,7 @@ function formatComponentName(component: string): string {
189195
/* Related Examples */
190196
.related-examples {
191197
border-top: 1px solid var(--goa-color-greyscale-200, #dcdcdc);
192-
padding-top: var(--goa-space-xl, 2rem);
198+
padding: var(--goa-space-xl) 0;
193199
}
194200

195201
.related-examples h2 {

0 commit comments

Comments
 (0)