Skip to content

Commit cb23074

Browse files
committed
Restructure docs to use docs-live as primary source with 10 sidebar sections
docs-live/ is now the primary documentation source instead of docs/. Only 3 manual guides remain from docs/ (METHODOLOGY, CONFIGURATION, GHERKIN-PATTERNS). All other content syncs from docs-live/ including new architecture, reference, validation, and changelog sections. Site now builds 74 pages.
1 parent f8abc87 commit cb23074

4 files changed

Lines changed: 224 additions & 148 deletions

File tree

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ pnpm-debug.log*
2222

2323
# Synced content (generated by scripts/sync-content.mjs at build time)
2424
# Hand-crafted pages (index.mdx, getting-started.md) are NOT ignored
25-
src/content/docs/delivery-process/guides/
26-
src/content/docs/delivery-process/reference/
25+
src/content/docs/delivery-process/tutorial/
26+
src/content/docs/delivery-process/architecture/
2727
src/content/docs/delivery-process/product-areas/
28+
src/content/docs/delivery-process/reference/
29+
src/content/docs/delivery-process/business-rules/
30+
src/content/docs/delivery-process/taxonomy/
31+
src/content/docs/delivery-process/validation/
2832
src/content/docs/delivery-process/decisions/
29-
src/content/docs/delivery-process/generated/
30-
src/content/docs/delivery-process/tutorial/
33+
src/content/docs/delivery-process/guides/
34+
src/content/docs/delivery-process/changelog/
3135

3236
# tmp files
3337
_tmp/

scripts/content-manifest.mjs

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
*
44
* This file is consumed by both the content sync pipeline and Astro/Starlight
55
* config so section structure only lives in one place.
6+
*
7+
* Primary content comes from docs-live/ (auto-generated).
8+
* Only 3 manual guides from docs/ remain (no generated equivalent).
69
*/
710

811
export const DELIVERY_PROCESS_DOCS = {
@@ -12,30 +15,29 @@ export const DELIVERY_PROCESS_DOCS = {
1215
gettingStartedSlug: 'delivery-process/getting-started',
1316
};
1417

18+
/**
19+
* Manual docs from docs/ that have no generated equivalent in docs-live/.
20+
* These are the only files still synced from the manual docs/ directory.
21+
*/
1522
export const DELIVERY_PROCESS_MANUAL_DOCS = {
1623
guides: [
1724
{ source: 'METHODOLOGY.md', slug: 'methodology', order: 1 },
1825
{ source: 'CONFIGURATION.md', slug: 'configuration', order: 2 },
19-
{ source: 'SESSION-GUIDES.md', slug: 'session-guides', order: 3 },
20-
{ source: 'GHERKIN-PATTERNS.md', slug: 'gherkin-patterns', order: 4 },
21-
{ source: 'ANNOTATION-GUIDE.md', slug: 'annotation-guide', order: 5 },
22-
],
23-
reference: [
24-
{ source: 'ARCHITECTURE.md', slug: 'architecture', order: 1 },
25-
{ source: 'PROCESS-API.md', slug: 'process-api', order: 2 },
26-
{ source: 'PROCESS-GUARD.md', slug: 'process-guard', order: 3 },
27-
{ source: 'VALIDATION.md', slug: 'validation', order: 4 },
28-
{ source: 'TAXONOMY.md', slug: 'taxonomy', order: 5 },
26+
{ source: 'GHERKIN-PATTERNS.md', slug: 'gherkin-patterns', order: 3 },
2927
],
3028
};
3129

3230
export const DELIVERY_PROCESS_SECTIONS = [
3331
{ label: 'Tutorial', directory: 'tutorial', collapsed: false },
34-
{ label: 'Guides', directory: 'guides', collapsed: false },
35-
{ label: 'Reference', directory: 'reference', collapsed: false },
32+
{ label: 'Architecture', directory: 'architecture', collapsed: false },
3633
{ label: 'Product Areas', directory: 'product-areas', collapsed: false },
37-
{ label: 'Architecture Decisions', directory: 'decisions', collapsed: true },
38-
{ label: 'Generated Reference', directory: 'generated', collapsed: true },
34+
{ label: 'Reference', directory: 'reference', collapsed: false },
35+
{ label: 'Business Rules', directory: 'business-rules', collapsed: true },
36+
{ label: 'Taxonomy', directory: 'taxonomy', collapsed: true },
37+
{ label: 'Validation', directory: 'validation', collapsed: true },
38+
{ label: 'Decisions', directory: 'decisions', collapsed: true },
39+
{ label: 'Guides', directory: 'guides', collapsed: true },
40+
{ label: 'Changelog', directory: 'changelog', collapsed: true },
3941
];
4042

4143
export const DELIVERY_PROCESS_SYNC_SUBDIRS = DELIVERY_PROCESS_SECTIONS.map(section => section.directory);
@@ -45,13 +47,27 @@ function toSectionUrl(section, slug) {
4547
}
4648

4749
const MANUAL_LINK_REWRITES = Object.fromEntries(
48-
Object.entries(DELIVERY_PROCESS_MANUAL_DOCS).flatMap(([section, files]) =>
49-
files.map(file => [`./${file.source}`, toSectionUrl(section, file.slug)])
50-
),
50+
DELIVERY_PROCESS_MANUAL_DOCS.guides.map(file => [`./${file.source}`, toSectionUrl('guides', file.slug)])
5151
);
5252

53+
/**
54+
* Link rewrites for docs/ files that are no longer synced but may still be
55+
* referenced by the 3 remaining manual guides. Points to their docs-live/
56+
* generated equivalents on the website.
57+
*/
58+
const REPLACED_DOCS_LINK_REWRITES = {
59+
'./ARCHITECTURE.md': `/${DELIVERY_PROCESS_DOCS.slug}/architecture/`,
60+
'./PROCESS-API.md': `/${DELIVERY_PROCESS_DOCS.slug}/reference/process-api-reference/`,
61+
'./PROCESS-GUARD.md': `/${DELIVERY_PROCESS_DOCS.slug}/reference/process-guard-reference/`,
62+
'./ANNOTATION-GUIDE.md': `/${DELIVERY_PROCESS_DOCS.slug}/reference/annotation-reference/`,
63+
'./SESSION-GUIDES.md': `/${DELIVERY_PROCESS_DOCS.slug}/reference/session-workflow-guide/`,
64+
'./TAXONOMY.md': `/${DELIVERY_PROCESS_DOCS.slug}/taxonomy/`,
65+
'./VALIDATION.md': `/${DELIVERY_PROCESS_DOCS.slug}/validation/`,
66+
};
67+
5368
export const DELIVERY_PROCESS_LINK_REWRITES = {
5469
...MANUAL_LINK_REWRITES,
70+
...REPLACED_DOCS_LINK_REWRITES,
5571
'./INDEX.md': `/${DELIVERY_PROCESS_DOCS.slug}/`,
5672
'../README.md': `/${DELIVERY_PROCESS_DOCS.slug}/getting-started/`,
5773
'../CHANGELOG.md': 'https://github.com/libar-dev/delivery-process/blob/main/CHANGELOG.md',
@@ -92,6 +108,10 @@ export const DELIVERY_PROCESS_LINK_PREFIX_REWRITES = [
92108
prefix: 'decisions/',
93109
targetPrefix: 'https://github.com/libar-dev/delivery-process/blob/main/',
94110
},
111+
{
112+
prefix: 'docs/',
113+
targetPrefix: 'https://github.com/libar-dev/delivery-process/blob/main/',
114+
},
95115
];
96116

97117
export const DELIVERY_PROCESS_SIDEBAR_GROUP = {

0 commit comments

Comments
 (0)