create-hlou-site 0.1.0 → 0.1.1
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/lib/spec.mjs +36 -3
- package/package.json +1 -1
package/lib/spec.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* The empty site spec a new Hlou site starts from (format 1, decision 219):
|
|
3
3
|
* the locales, a neutral theme, the site's name in the `site.name` slot and
|
|
4
|
-
* one home page
|
|
4
|
+
* one home page whose hero shows that name, so the first `pnpm dev` draws
|
|
5
|
+
* something. Pure: options in, files out.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/** A language tag as the spec reads it (`fr`, `en-GB`, `ar-TN`). */
|
|
@@ -116,11 +117,43 @@ export function emptySpec({ name, locales }) {
|
|
|
116
117
|
title: homeTitle(source),
|
|
117
118
|
position: 0,
|
|
118
119
|
status: 'ready',
|
|
119
|
-
sections: [
|
|
120
|
+
sections: [
|
|
121
|
+
{
|
|
122
|
+
key: 'hero',
|
|
123
|
+
label: 'Hero',
|
|
124
|
+
slots: [{ key: 'hero.title', kind: 'heading' }],
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
document: {
|
|
128
|
+
root: 'root',
|
|
129
|
+
rootProps: {},
|
|
130
|
+
nodes: {
|
|
131
|
+
root: { id: 'root', type: 'root', parent: null, slot: '', order: 'a0', props: {} },
|
|
132
|
+
'hero-home': {
|
|
133
|
+
id: 'hero-home',
|
|
134
|
+
type: 'hero',
|
|
135
|
+
parent: 'root',
|
|
136
|
+
slot: 'content',
|
|
137
|
+
order: 'a0',
|
|
138
|
+
role: 'hero',
|
|
139
|
+
section: 'hero',
|
|
140
|
+
props: {
|
|
141
|
+
eyebrow: '',
|
|
142
|
+
title: { $slot: 'hero.title' },
|
|
143
|
+
description: { type: 'doc', content: [] },
|
|
144
|
+
buttons: [],
|
|
145
|
+
align: 'start',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
120
150
|
}),
|
|
121
151
|
[`hlou/site/content/${source}.json`]: json({
|
|
122
152
|
$schema: '../../../renderer/spec/json-schema/content.schema.json',
|
|
123
|
-
values: {
|
|
153
|
+
values: {
|
|
154
|
+
'site/site.name': { kind: 'text', text: name },
|
|
155
|
+
'home/hero.title': { kind: 'heading', text: name },
|
|
156
|
+
},
|
|
124
157
|
}),
|
|
125
158
|
};
|
|
126
159
|
}
|