Skip to content

Commit eb69031

Browse files
committed
chore(site): add index pages for breadcrumb steps
1 parent 1e2e5f4 commit eb69031

File tree

7 files changed

+99
-0
lines changed

7 files changed

+99
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
4+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
5+
6+
interface Props {
7+
directory: string;
8+
title: string;
9+
description: string;
10+
intro: string;
11+
}
12+
13+
const { directory, title, description, intro } = Astro.props;
14+
15+
const allDocs = await getCollection('docs');
16+
const pages = allDocs
17+
.filter((doc) => doc.id.startsWith(`${directory}/`) && doc.id !== `${directory}/index`)
18+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
19+
20+
const pageData = {
21+
title,
22+
description,
23+
template: 'doc',
24+
};
25+
---
26+
27+
<StarlightPage frontmatter={pageData}>
28+
<p set:html={intro} />
29+
30+
<CardGrid>
31+
{pages.map((page) => (
32+
<LinkCard
33+
title={page.data.title}
34+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
35+
description={page.data.description}
36+
/>
37+
))}
38+
</CardGrid>
39+
</StarlightPage>

site/src/pages/command.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="command"
7+
title="Commands"
8+
description="CLI commands for managing dependency versions across your monorepo"
9+
intro="Syncpack provides several commands to lint, fix, format, and update dependencies in your monorepo."
10+
/>

site/src/pages/config.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="config"
7+
title="Configuration File"
8+
description="Configure syncpack behavior through .syncpackrc files and command-line options"
9+
intro="Configure syncpack's behavior using a <code>.syncpackrc</code> file in your project root. These options control formatting, sorting, dependency management, and version constraints."
10+
/>

site/src/pages/guide.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="guide"
7+
title="Guides"
8+
description="Learn how to use Syncpack effectively in your monorepo"
9+
intro="Step-by-step guides to help you get the most out of Syncpack in your JavaScript monorepo."
10+
/>

site/src/pages/reference.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="reference"
7+
title="Reference"
8+
description="Technical reference documentation for Syncpack concepts and terminology"
9+
intro="Reference documentation covering dependency types, specifier types, status codes, and glossary of terms used throughout Syncpack."
10+
/>

site/src/pages/semver-groups.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="semver-groups"
7+
title="Semver Groups"
8+
description="Configure semver range formats for dependencies across your monorepo"
9+
intro="Semver Groups define what semver range format dependencies should use (e.g., <code>^</code>, <code>~</code>, exact versions). These rules control how version ranges are formatted in your package.json files."
10+
/>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import DirectoryIndex from '@components/DirectoryIndex.astro';
3+
---
4+
5+
<DirectoryIndex
6+
directory="version-groups"
7+
title="Version Groups"
8+
description="Control how dependency versions are managed across your monorepo"
9+
intro="Version Groups define rules for how dependency versions should be managed across your monorepo. Each strategy provides different constraints and behaviors."
10+
/>

0 commit comments

Comments
 (0)