Commit a3fa8b1
committed
centralize global json-ld in custom head
GEO Optimization: move global schema generation out of Starlight config head
entries and into a dedicated Head component override.
What changed:
- Added `src/components/Head.astro` that composes Starlight default head and
appends one `application/ld+json` script.
- Kept schema parity for Organization/WebSite/Book and switched Organization
`@id` to the canonical `swmansion.com` domain.
- Updated `astro.config.ts` to register `components.Head` and removed the
inline JSON-LD `head` script entry.
- Added AGENTS guidance to assume `Astro.site` is always defined in config.
Why:
- Keeps `astro.config.ts` focused on configuration, not schema object
construction.
- Creates a stable base for upcoming page-level JSON-LD work while preserving
existing global graph behavior.
Manual testing:
- Ran `bun lint` (`prettier --write . && astro check`) successfully.
- Ran `bun run build` successfully earlier in this thread and confirmed
generated HTML still contains the global JSON-LD graph.
Special considerations:
- Commit intentionally includes only staged files from this thread.
- Leaves untracked `GEO.md` untouched.1 parent 7f4e55b commit a3fa8b1
3 files changed
+60
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 8 | | |
51 | 9 | | |
52 | 10 | | |
| |||
102 | 60 | | |
103 | 61 | | |
104 | 62 | | |
| 63 | + | |
105 | 64 | | |
106 | 65 | | |
107 | 66 | | |
| |||
129 | 88 | | |
130 | 89 | | |
131 | 90 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 91 | | |
138 | 92 | | |
139 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments