Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ const workspaceRoot = path.resolve(__dirname, "..");
export default defineConfig({
root: ".",
outDir: "../dist/docs",
redirects: {
"/components/circular-progress-indicator": "/components/circular-progress",
"/components/file-uploader": "/components/file-upload-input",
"/components/header": "/components/app-header",
"/components/icons": "/components/icon",
"/components/linear-progress-indicator": "/components/linear-progress",
"/components/notification-banner": "/components/notification",
"/components/radio": "/components/radio-group",
"/components/skeleton-loader": "/components/skeleton",
"/design-tokens": "/tokens",
"/get-started/support": "/support",
"/examples/show-multiple-actions-in-a-table": "/examples/show-multiple-actions-in-a-compact-table",
},
build: {
chunkSizeWarningLimit: 1000,
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/MobileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function MobileHeader() {
height="28"
className="mobile-header__logo"
/>
<span className="mobile-header__title">Design system</span>
<span className="mobile-header__title">Design System</span>
</a>
</div>
<div className="mobile-header__right">
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/nav/ParentMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function ParentMenu({
return (
<>
<GoabxWorkSideMenu
heading="Design system"
heading="Design System"
url="/"
open={isOpen}
onToggle={onToggle}
Expand Down
6 changes: 6 additions & 0 deletions docs/src/pages/components/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const configurations = getComponentConfigurations(slug);

// GitHub issues URL for this component
const githubIssuesUrl = `https://github.com/GovAlta/ui-components/issues?q=is%3Aissue+is%3Aopen+label%3A%22${encodeURIComponent(component.data.name)}%22`;

const oldDocsUrl = `https://v1.design.alberta.ca/components/${slug}`;
---

<ComponentPageLayout
Expand Down Expand Up @@ -101,6 +103,10 @@ const githubIssuesUrl = `https://github.com/GovAlta/ui-components/issues?q=is%3A
API documentation is automatically extracted from the component source code.
</goa-callout>
)}

<goa-link size="small" trailingicon="open">
<a href={oldDocsUrl} target="_blank" rel="noopener noreferrer">View old component docs</a>
</goa-link>
</TabContentWrapper>
</goa-tab>

Expand Down
8 changes: 7 additions & 1 deletion docs/src/pages/examples/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function formatComponentName(component: string): string {
.map((word, i) => i === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word)
.join(' ');
}

const oldDocsUrl = `https://v1.design.alberta.ca/examples/${slug}`;
---

<ExamplesPageLayout
Expand Down Expand Up @@ -112,6 +114,10 @@ function formatComponentName(component: string): string {
</div>
</section>
)}

<goa-link size="small" trailingicon="open">
<a href={oldDocsUrl} target="_blank" rel="noopener noreferrer">View old example docs</a>
</goa-link>
</article>
</ExamplesPageLayout>

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

.related-examples h2 {
Expand Down
Loading