Skip to content

Commit

Permalink
feat: add link descriptions and readd blog
Browse files Browse the repository at this point in the history
Signed-off-by: Akiff Manji <[email protected]>
  • Loading branch information
amanji committed Aug 10, 2024
1 parent 9bcdf48 commit 2f9a854
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 50 deletions.
1 change: 1 addition & 0 deletions digital-trust-toolkit/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Roadmap
3 changes: 2 additions & 1 deletion digital-trust-toolkit/docs/delivery-manual/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: This is a description
order: 3
description: Find step-by-step guidance for successful digital trust adoption.
---

# Delivery Manual
Expand Down
5 changes: 5 additions & 0 deletions digital-trust-toolkit/docs/experience-patterns/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
---
order: 2
description: Explore proven patterns and use cases for implementing digital trust.
---

# Experience Patterns
5 changes: 5 additions & 0 deletions digital-trust-toolkit/docs/foundations/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
---
order: 1
description: Understand the core principles and frameworks of digital trust.
---

# Foundations
6 changes: 6 additions & 0 deletions digital-trust-toolkit/docs/resources/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
---
sidebar_position: 1
order: 4
description: Utilize a comprehensive set of tools and guides to launch your digital trust projects.
---

# Resources
10 changes: 8 additions & 2 deletions digital-trust-toolkit/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@ const config: Config = {
...mainLinks.map((link: MainLink) => ({
type: 'docSidebar',
sidebarId: link.id,
label: link.label,
position: 'left' as const,
label: link.label,
metadata: {
to: link.to,
description: link.description,
autogenerated: true,
}
})),
{ to: '/blog', label: 'Roadmap', position: 'left' },
{
href: 'https://github.com/bcgov/bc-vcpedia',
href: 'https://digital.gov.bc.ca/digital-trust/home',
label: 'About',
position: 'right',
},
Expand Down
61 changes: 14 additions & 47 deletions digital-trust-toolkit/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,33 @@ import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

type FeatureItem = {
title: string;
path: string;
description?: JSX.Element;
interface FeatureItem {
label: string;
metadata: any;
};

const FeatureList: FeatureItem[] = [
{
title: 'Foundations',
path: '/docs/foundations',
description: (
<>
Understand the core principles and frameworks of digital trust.
</>
),
},
{
title: 'Experience Patterns',
path: '/docs/experience-patterns',
description: (
<>
Explore proven patterns and use cases for implementing digital trust.
</>
),
},
{
title: 'Delivery Manual',
path: '/docs/delivery-manual',
description: (
<>
Find step-by-step guidance for successful digital trust adoption.
</>
),
},
{
title: 'Resources',
path: '/docs/resources',
description: (
<>
Utilize a comprehensive set of tools and guides to launch your digital trust projects.
</>
),
},
];

function Feature({ title, path, description }: FeatureItem) {
function Feature({ label, metadata }: FeatureItem) {
return (
<div className={clsx('col col--3', styles.feature)}>
<Link to={path} className={clsx('unstyled-link')}>
<Link to={`docs/${metadata?.to}`} className={clsx('unstyled-link')}>
<div>
<Heading as="h2">{title}</Heading>
<p>{description}</p>
<Heading as="h2">{label}</Heading>
<p>{metadata?.description}</p>
</div>
</Link>
</div>
);
}

export default function HomepageFeatures(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
const { themeConfig } = siteConfig;

const FeatureList: FeatureItem[] = (themeConfig.navbar as any).items
.filter((item: any) => item?.metadata?.autogenerated);

return (
<section className={styles.features}>
<div className="container">
Expand Down

0 comments on commit 2f9a854

Please sign in to comment.