Skip to content

Commit a3d31bb

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

File tree

9 files changed

+310
-176
lines changed

9 files changed

+310
-176
lines changed

site/astro.config.mjs

Lines changed: 166 additions & 169 deletions
Large diffs are not rendered by default.

site/src/components/Head.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const schemas = route ? buildSchemas(route) : [];
3030

3131
{
3232
schemas.map((schema) => (
33-
<script type="application/ld+json" set:html={JSON.stringify(schema)} />
33+
<script is:inline type="application/ld+json" set:html={JSON.stringify(schema)} />
3434
))
3535
}
3636

site/src/content/docs/command.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Commands
3+
description: CLI commands for managing dependency versions across your monorepo
4+
---
5+
6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
7+
import { getCollection } from 'astro:content';
8+
9+
export const allDocs = await getCollection('docs');
10+
export const pages = allDocs
11+
.filter((doc) => doc.id.startsWith('command/') && doc.id !== 'command')
12+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
13+
14+
Syncpack provides several commands to lint, fix, format, and update dependencies in your monorepo.
15+
16+
<CardGrid>
17+
{pages.map((page) => (
18+
<LinkCard
19+
title={page.data.title}
20+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
21+
description={page.data.description}
22+
/>
23+
))}
24+
</CardGrid>

site/src/content/docs/config.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Configuration File
3+
description: Configure syncpack behavior through .syncpackrc files and command-line options
4+
---
5+
6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
7+
import { getCollection } from 'astro:content';
8+
9+
export const allDocs = await getCollection('docs');
10+
export const pages = allDocs
11+
.filter((doc) => doc.id.startsWith('config/') && doc.id !== 'config')
12+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
13+
14+
Configure syncpack's behavior using a `.syncpackrc` file in your project root. These options control formatting, sorting, dependency management, and version constraints.
15+
16+
<CardGrid>
17+
{pages.map((page) => (
18+
<LinkCard
19+
title={page.data.title}
20+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
21+
description={page.data.description}
22+
/>
23+
))}
24+
</CardGrid>

site/src/content/docs/guide.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Guides
3+
description: Learn how to use Syncpack effectively in your monorepo
4+
---
5+
6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
7+
import { getCollection } from 'astro:content';
8+
9+
export const allDocs = await getCollection('docs');
10+
export const pages = allDocs
11+
.filter((doc) => doc.id.startsWith('guide/') && doc.id !== 'guide')
12+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
13+
14+
Step-by-step guides to help you get the most out of Syncpack in your JavaScript monorepo.
15+
16+
<CardGrid>
17+
{pages.map((page) => (
18+
<LinkCard
19+
title={page.data.title}
20+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
21+
description={page.data.description}
22+
/>
23+
))}
24+
</CardGrid>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Reference
3+
description: Technical reference documentation for Syncpack concepts and terminology
4+
---
5+
6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
7+
import { getCollection } from 'astro:content';
8+
9+
export const allDocs = await getCollection('docs');
10+
export const pages = allDocs
11+
.filter((doc) => doc.id.startsWith('reference/') && doc.id !== 'reference')
12+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
13+
14+
Reference documentation covering dependency types, specifier types, status codes, and glossary of terms used throughout Syncpack.
15+
16+
<CardGrid>
17+
{pages.map((page) => (
18+
<LinkCard
19+
title={page.data.title}
20+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
21+
description={page.data.description}
22+
/>
23+
))}
24+
</CardGrid>

site/src/content/docs/config/semver-groups.mdx renamed to site/src/content/docs/semver-groups.mdx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
---
2-
title: semverGroups
3-
slug: semver-groups
4-
description: Define rules for how semver ranges are formatted across different parts of your monorepo
2+
title: Semver Groups
3+
description: Configure semver range formats for dependencies across your monorepo
54
---
65

6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
7+
import { getCollection } from 'astro:content';
8+
9+
export const allDocs = await getCollection('docs');
10+
export const pages = allDocs
11+
.filter((doc) => doc.id.startsWith('semver-groups/') && doc.id !== 'semver-groups')
12+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
13+
714
Allow some packages to have different semver range rules to the rest of your monorepo. Each dependency can only belong to one semver group, the first rule which matches a given dependency and package will apply.
815

916
## Examples
@@ -74,3 +81,15 @@ Allow some packages to have different semver range rules to the rest of your mon
7481
]
7582
}
7683
```
84+
85+
## Variants
86+
87+
<CardGrid>
88+
{pages.map((page) => (
89+
<LinkCard
90+
title={page.data.title}
91+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
92+
description={page.data.description}
93+
/>
94+
))}
95+
</CardGrid>

site/src/content/docs/config/version-groups.mdx renamed to site/src/content/docs/version-groups.mdx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
---
2-
title: versionGroups
3-
slug: version-groups
4-
description: Split your monorepo into isolated sections with separate versioning policies for each
2+
title: Version Groups
3+
description: Control how dependency versions are managed across your monorepo
54
---
65

6+
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
77
import { Tabs, TabItem } from "@astrojs/starlight/components";
8+
import { getCollection } from 'astro:content';
9+
10+
export const allDocs = await getCollection('docs');
11+
export const pages = allDocs
12+
.filter((doc) => doc.id.startsWith('version-groups/') && doc.id !== 'version-groups')
13+
.sort((a, b) => a.data.title.localeCompare(b.data.title));
814

915
Version groups split your project into isolated sections, each with their own policy for how versions should be managed.
1016

@@ -78,3 +84,15 @@ Any properties of a version group that are omitted will match-all by default, so
7884

7985
</TabItem>
8086
</Tabs>
87+
88+
## Variants
89+
90+
<CardGrid>
91+
{pages.map((page) => (
92+
<LinkCard
93+
title={page.data.title}
94+
href={`/syncpack/${page.id.replace(/\.mdx?$/, '')}/`}
95+
description={page.data.description}
96+
/>
97+
))}
98+
</CardGrid>

site/src/route-data.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ function getCustomTitle(route: any): string {
3333
if (parts.length >= 1) {
3434
const category = categoryMap[parts[0]];
3535
if (category) {
36+
// Skip category if it matches the page title (for index pages)
37+
if (category === pageTitle) {
38+
return `${pageTitle} | Syncpack`;
39+
}
3640
return `${pageTitle} | ${category} | Syncpack`;
3741
}
3842
}

0 commit comments

Comments
 (0)