Skip to content

Commit 4d16f5d

Browse files
authored
Merge pull request #115 from braboj/feature/single-source-content
Eliminate dual-source content model
2 parents 83e37fc + bba47d2 commit 4d16f5d

14 files changed

Lines changed: 27 additions & 3832 deletions

CLAUDE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ assets/
4646
banners/
4747
doc/
4848
uml/
49-
astro-site/ # Astro build (imports from chapters/ and assets/)
49+
astro-site/ # Astro build (reads directly from chapters/)
5050
docs/ # Legacy MkDocs content (reference, not active)
5151
solid-ai-templates/ # Submodule — Imbra-Ltd/solid-ai-templates
5252
```
@@ -109,6 +109,9 @@ Every chapter follows this structure:
109109

110110
- Reference other chapters by file: `[Building Blocks](02-building-blocks.md)`
111111
- Reference sections within a chapter by heading anchor: `[Tag Object](#tag-object-labels)`
112+
- The remark plugin (`astro-site/src/plugins/remark-rewrite-links.ts`)
113+
rewrites `NN-slug.md` links to `../slug/` at build time — no manual
114+
sync needed
112115

113116
### Images
114117

astro-site/astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
3+
import { remarkRewriteLinks } from './src/plugins/remark-rewrite-links.ts';
34

45
// https://astro.build/config
56
export default defineConfig({
@@ -8,5 +9,6 @@ export default defineConfig({
89
trailingSlash: 'always',
910
markdown: {
1011
syntaxHighlight: false,
12+
remarkPlugins: [remarkRewriteLinks],
1113
},
1214
});

astro-site/src/content.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { glob } from "astro/loaders";
44
const docs = defineCollection({
55
loader: glob({
66
pattern: "**/*.md",
7-
base: "./src/content/docs",
7+
base: "../chapters",
88
generateId: ({ entry }) => entry.replace(/\.md$/, ""),
99
}),
1010
schema: z.object({

astro-site/src/content/docs/appendix.md

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)