@shipsite.dev/core 0.2.15 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipsite.dev/core",
3
- "version": "0.2.15",
3
+ "version": "0.2.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/shipsite/shipsite",
@@ -50,7 +50,8 @@
50
50
  },
51
51
  "files": [
52
52
  "dist/",
53
- "src/generate-slug-map.mjs"
53
+ "src/generate-slug-map.mjs",
54
+ "shipsite.schema.json"
54
55
  ],
55
56
  "scripts": {
56
57
  "build": "tsc",
@@ -0,0 +1,227 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ShipSite Configuration",
4
+ "description": "Configuration file for a ShipSite project (shipsite.json).",
5
+ "type": "object",
6
+ "required": ["name", "url", "pages"],
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "JSON Schema reference for IDE autocompletion."
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Site name, used in metadata and header."
15
+ },
16
+ "url": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "Canonical site URL (e.g. \"https://example.com\")."
20
+ },
21
+ "logo": {
22
+ "description": "Logo path or light/dark variants.",
23
+ "oneOf": [
24
+ { "type": "string" },
25
+ {
26
+ "type": "object",
27
+ "required": ["light", "dark"],
28
+ "properties": {
29
+ "light": { "type": "string" },
30
+ "dark": { "type": "string" }
31
+ },
32
+ "additionalProperties": false
33
+ }
34
+ ]
35
+ },
36
+ "favicon": {
37
+ "type": "string",
38
+ "description": "Path to favicon (e.g. \"/favicon.png\")."
39
+ },
40
+ "ogImage": {
41
+ "type": "string",
42
+ "description": "Default Open Graph image path."
43
+ },
44
+ "colors": {
45
+ "type": "object",
46
+ "description": "Brand colors.",
47
+ "properties": {
48
+ "primary": { "type": "string", "description": "Primary brand color (hex)." },
49
+ "accent": { "type": "string", "description": "Accent color (hex)." },
50
+ "background": { "type": "string", "description": "Background color (hex)." },
51
+ "text": { "type": "string", "description": "Text color (hex)." }
52
+ },
53
+ "required": ["primary"],
54
+ "additionalProperties": false
55
+ },
56
+ "fonts": {
57
+ "type": "object",
58
+ "description": "Font families.",
59
+ "properties": {
60
+ "heading": { "type": "string" },
61
+ "body": { "type": "string" }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ "i18n": {
66
+ "type": "object",
67
+ "description": "Internationalization settings.",
68
+ "properties": {
69
+ "defaultLocale": { "type": "string", "default": "en" },
70
+ "locales": {
71
+ "type": "array",
72
+ "items": { "type": "string" },
73
+ "default": ["en"]
74
+ },
75
+ "localePrefix": {
76
+ "type": "string",
77
+ "enum": ["as-needed", "always", "never"],
78
+ "default": "as-needed"
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ },
83
+ "navigation": {
84
+ "type": "object",
85
+ "description": "Header navigation.",
86
+ "properties": {
87
+ "items": {
88
+ "type": "array",
89
+ "items": { "$ref": "#/$defs/navigationItem" }
90
+ },
91
+ "cta": { "$ref": "#/$defs/navigationItem" }
92
+ },
93
+ "required": ["items"],
94
+ "additionalProperties": false
95
+ },
96
+ "footer": {
97
+ "type": "object",
98
+ "description": "Footer configuration.",
99
+ "properties": {
100
+ "columns": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "required": ["title", "links"],
105
+ "properties": {
106
+ "title": { "$ref": "#/$defs/localizedString", "description": "Column heading." },
107
+ "links": {
108
+ "type": "array",
109
+ "items": { "$ref": "#/$defs/navigationItem" }
110
+ }
111
+ },
112
+ "additionalProperties": false
113
+ }
114
+ },
115
+ "social": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "object",
119
+ "required": ["platform", "href"],
120
+ "properties": {
121
+ "platform": { "type": "string", "description": "e.g. \"github\", \"twitter\", \"linkedin\"." },
122
+ "href": { "type": "string" }
123
+ },
124
+ "additionalProperties": false
125
+ }
126
+ },
127
+ "copyright": { "$ref": "#/$defs/localizedString" }
128
+ },
129
+ "additionalProperties": false
130
+ },
131
+ "pages": {
132
+ "type": "array",
133
+ "description": "Page definitions.",
134
+ "items": {
135
+ "type": "object",
136
+ "required": ["slug", "type", "content"],
137
+ "properties": {
138
+ "slug": { "type": "string", "description": "URL slug (empty string for root/landing)." },
139
+ "type": {
140
+ "type": "string",
141
+ "description": "Page type.",
142
+ "enum": ["landing", "page", "blog-index", "blog-article", "legal"]
143
+ },
144
+ "content": { "type": "string", "description": "Content folder name inside content/." },
145
+ "locales": {
146
+ "type": "array",
147
+ "items": { "type": "string" },
148
+ "description": "Locales this page is available in. Defaults to all configured locales."
149
+ }
150
+ },
151
+ "additionalProperties": false
152
+ }
153
+ },
154
+ "blog": {
155
+ "type": "object",
156
+ "description": "Blog configuration.",
157
+ "properties": {
158
+ "authors": {
159
+ "type": "object",
160
+ "description": "Author definitions keyed by ID.",
161
+ "additionalProperties": {
162
+ "type": "object",
163
+ "required": ["name"],
164
+ "properties": {
165
+ "name": { "type": "string" },
166
+ "role": { "$ref": "#/$defs/localizedString" },
167
+ "image": { "type": "string" },
168
+ "bio": { "$ref": "#/$defs/localizedString" }
169
+ },
170
+ "additionalProperties": false
171
+ }
172
+ },
173
+ "categories": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "object",
177
+ "required": ["key", "label"],
178
+ "properties": {
179
+ "key": { "type": "string" },
180
+ "label": {
181
+ "type": "object",
182
+ "description": "Locale → label map (e.g. { \"en\": \"Tech\", \"de\": \"Technik\" }).",
183
+ "additionalProperties": { "type": "string" }
184
+ }
185
+ },
186
+ "additionalProperties": false
187
+ }
188
+ },
189
+ "categoryMap": {
190
+ "type": "object",
191
+ "description": "Maps raw category strings to canonical category keys.",
192
+ "additionalProperties": { "type": "string" }
193
+ }
194
+ },
195
+ "additionalProperties": false
196
+ },
197
+ "analytics": {
198
+ "type": "object",
199
+ "properties": {
200
+ "googleTagManager": { "type": "string", "description": "GTM container ID (e.g. \"GTM-XXXXX\")." }
201
+ },
202
+ "additionalProperties": false
203
+ }
204
+ },
205
+ "additionalProperties": false,
206
+ "$defs": {
207
+ "localizedString": {
208
+ "description": "A plain string or a locale map (e.g. { \"en\": \"Features\", \"de\": \"Funktionen\" }).",
209
+ "oneOf": [
210
+ { "type": "string" },
211
+ {
212
+ "type": "object",
213
+ "additionalProperties": { "type": "string" }
214
+ }
215
+ ]
216
+ },
217
+ "navigationItem": {
218
+ "type": "object",
219
+ "required": ["label", "href"],
220
+ "properties": {
221
+ "label": { "$ref": "#/$defs/localizedString", "description": "Display text (plain string or locale map)." },
222
+ "href": { "type": "string", "description": "Link target." }
223
+ },
224
+ "additionalProperties": false
225
+ }
226
+ }
227
+ }