@janga/norna 0.7.1 → 0.7.2
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/README.md +18 -4
- package/astro.config.mjs +2 -0
- package/bin/norna-cli.mjs +170 -0
- package/bin/norna.mjs +149 -150
- package/docs/README.md +36 -16
- package/docs/commands.md +18 -5
- package/docs/configuration.md +37 -2
- package/docs/content.md +98 -257
- package/docs/{command-organization.md → design/command-organization.md} +9 -5
- package/docs/{site-examples-structure-note.md → design/site-examples-structure.md} +17 -22
- package/docs/engine-development.md +33 -5
- package/docs/getting-started.md +40 -4
- package/docs/local-development.md +13 -0
- package/docs/publishing.md +23 -0
- package/docs/routes.md +90 -0
- package/docs/site-structure.md +15 -8
- package/docs/theme.md +150 -0
- package/docs/typography.md +125 -0
- package/examples/dog-gallery/site/.norna/generated-images.json +226 -0
- package/examples/dog-gallery/site/config.mjs +97 -0
- package/examples/dog-gallery/site/content.md +146 -0
- package/examples/dog-gallery/site/images/black-dogs/black-puppy-meadow.png +0 -0
- package/examples/dog-gallery/site/images/black-dogs/photo-of-a-black-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/brown-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/dog-accompanies-master.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/golden-retriever.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/toller-puppy.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-cute-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-puppy-garden.png +0 -0
- package/examples/dog-gallery/site/public/favicon.svg +7 -0
- package/examples/dog-gallery/site/public/robots.txt +2 -0
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +35 -0
- package/examples/dog-gallery/site/theme.md +55 -0
- package/fixtures/basic/site/config.mjs +1 -0
- package/package.json +8 -7
- package/scripts/check-config.mjs +1 -0
- package/scripts/dev-local.mjs +64 -15
- package/scripts/init-site.mjs +1 -1
- package/scripts/lib/project-config.mjs +22 -0
- package/scripts/lib/site-content.mjs +2 -1
- package/scripts/lib/site-paths.mjs +18 -3
- package/scripts/lib/typography.mjs +5 -5
- package/scripts/show-typography.mjs +252 -29
- package/scripts/test-cli-discovery.mjs +124 -0
- package/scripts/test-engine-commands.mjs +18 -4
- package/scripts/test-navigation.mjs +10 -6
- package/scripts/test-package-check.mjs +32 -4
- package/src/components/SiteNavigation.astro +7 -5
- package/src/components/SitePage.astro +3 -0
- package/src/components/SiteSection.astro +24 -24
- package/src/content.config.ts +4 -0
- package/src/layouts/BaseLayout.astro +2 -1
- package/src/lib/basePath.ts +21 -0
- package/src/lib/generatedImages.ts +8 -4
- package/src/lib/sectionContent.ts +6 -1
- package/src/lib/sitePublicAssets.ts +8 -1
- package/src/styles/global.css +8 -8
- package/starters/basic/.github/workflows/deploy.yml +3 -3
- package/starters/basic/README.md +21 -0
- package/starters/basic/package.json +1 -1
- package/starters/basic/site/config.mjs +1 -0
- package/starters/basic/site/content.md +5 -3
- package/starters/basic/site/theme.md +4 -0
package/docs/configuration.md
CHANGED
|
@@ -16,8 +16,9 @@ the current values for any one site.
|
|
|
16
16
|
- Required: yes.
|
|
17
17
|
- Default: none.
|
|
18
18
|
- Validation: non-empty absolute URL accepted by `new URL()`.
|
|
19
|
-
- Consequence: wrong values render a wrong canonical URL and make deploy
|
|
20
|
-
point at the wrong site.
|
|
19
|
+
- Consequence: wrong values render a wrong canonical URL and make deploy
|
|
20
|
+
output point at the wrong site. For GitHub Pages project sites, include the
|
|
21
|
+
repository path in the URL, for example `https://owner.github.io/repo-name/`.
|
|
21
22
|
|
|
22
23
|
Example:
|
|
23
24
|
|
|
@@ -27,6 +28,36 @@ site: {
|
|
|
27
28
|
}
|
|
28
29
|
```
|
|
29
30
|
|
|
31
|
+
### `site.basePath`
|
|
32
|
+
|
|
33
|
+
- Purpose: URL path prefix used for generated internal page links, favicons,
|
|
34
|
+
generated image URLs, and root-relative links or images written in Markdown.
|
|
35
|
+
- Type: string URL path.
|
|
36
|
+
- Required: no.
|
|
37
|
+
- Default: `/`.
|
|
38
|
+
- Validation: must start and end with `/` and must not contain whitespace,
|
|
39
|
+
`?`, `#`, or `//`.
|
|
40
|
+
- Consequence: use `/` for a root site or custom domain. Use
|
|
41
|
+
`/repository-name/` for a GitHub Pages project site without a custom domain.
|
|
42
|
+
Source Markdown can still use root-relative paths such as `/workflow.svg` or
|
|
43
|
+
`/getting-started/`; Norna prefixes them during rendering.
|
|
44
|
+
|
|
45
|
+
Examples:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
site: {
|
|
49
|
+
url: 'https://example.com/',
|
|
50
|
+
basePath: '/',
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
site: {
|
|
56
|
+
url: 'https://janga.github.io/norna/',
|
|
57
|
+
basePath: '/norna/',
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
30
61
|
## Layout
|
|
31
62
|
|
|
32
63
|
### `layout.pageWidth`
|
|
@@ -374,3 +405,7 @@ If `NORNA_SITE_DIR` is set to an empty value, commands fail. Relative site
|
|
|
374
405
|
directories are resolved by walking upward from the invocation root until the
|
|
375
406
|
selected directory contains `config.mjs` and `content.md`. Absolute site
|
|
376
407
|
directories are accepted and make their parent the site project root.
|
|
408
|
+
|
|
409
|
+
When no site directory is explicitly selected, the current directory itself can
|
|
410
|
+
be the site directory if it contains `config.mjs` and `content.md`. If not,
|
|
411
|
+
Norna walks upward looking for a default `site/` directory with those files.
|
package/docs/content.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# Content
|
|
2
2
|
|
|
3
|
-
`site/content.md` is the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Markdown section model.
|
|
3
|
+
`site/content.md` is the homepage page file for a `norna` site. It defines the
|
|
4
|
+
page metadata, section order, section ids, gallery rows, and Markdown text for
|
|
5
|
+
the homepage.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
Route pages use the same page and section model in
|
|
8
|
+
`site/routes/<route-folder>/route-content.md`. See [Routes](routes.md) for the
|
|
9
|
+
route-specific rules.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Site-wide visual defaults belong in [Theme](theme.md). Typography presets and
|
|
12
|
+
overrides are described in [Typography](typography.md). Technical site settings
|
|
13
|
+
belong in [Configuration](configuration.md).
|
|
14
|
+
|
|
15
|
+
## Page Frontmatter
|
|
12
16
|
|
|
13
17
|
The Astro content schema validates these top-level fields in page files:
|
|
14
18
|
|
|
@@ -16,54 +20,19 @@ The Astro content schema validates these top-level fields in page files:
|
|
|
16
20
|
- `description`: required string. Rendered as the meta description.
|
|
17
21
|
- `slug`: optional route URL slug. It is ignored on the homepage. If omitted on
|
|
18
22
|
a route page, the route folder name is used.
|
|
19
|
-
- `navigation`: optional page navigation metadata.
|
|
20
|
-
- `presentation`: optional page-level presentation overrides.
|
|
21
|
-
|
|
23
|
+
- `navigation`: optional page navigation metadata. See [Routes](routes.md).
|
|
24
|
+
- `presentation`: optional page-level presentation overrides. See
|
|
25
|
+
[Theme](theme.md) and [Typography](typography.md).
|
|
26
|
+
- `frame`: optional page-level frame color source. See [Theme](theme.md).
|
|
22
27
|
- `sections`: required non-empty array. Defines section order, ids,
|
|
23
28
|
presentation overrides, and gallery rows.
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- `include`: optional boolean. Defaults to `true`.
|
|
28
|
-
- `label`: optional string. Defaults to `title`.
|
|
29
|
-
- `order`: optional integer. Defaults to `0` for the homepage and `100` for
|
|
30
|
-
route pages.
|
|
31
|
-
|
|
32
|
-
Each `sections[]` item has:
|
|
33
|
-
|
|
34
|
-
- `id`: required string matching `^[a-z0-9-]+$`. Used for anchors, navigation,
|
|
35
|
-
image directories, and Markdown heading ids.
|
|
36
|
-
- `visible`: optional date window that controls whether the section is rendered.
|
|
37
|
-
- `presentation`: optional object with `backgroundColor`, `textColor`, and/or
|
|
38
|
-
`typography` overrides.
|
|
39
|
-
- `gallery`: optional array, defaulting to `[]`.
|
|
40
|
-
|
|
41
|
-
Each gallery row has:
|
|
42
|
-
|
|
43
|
-
- `image`: required filename matching `^[a-z0-9][a-z0-9.-]*\.(jpe?g|png)$`.
|
|
44
|
-
It must be a filename, not a path.
|
|
45
|
-
- `alt`: required string.
|
|
46
|
-
- `caption`: optional string.
|
|
47
|
-
|
|
48
|
-
## Routes
|
|
49
|
-
|
|
50
|
-
The homepage is always `site/content.md` and builds to `/`.
|
|
51
|
-
|
|
52
|
-
Add a first-level route by creating:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
site/routes/about/route-content.md
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Minimal route page:
|
|
30
|
+
Minimal homepage:
|
|
59
31
|
|
|
60
32
|
```md
|
|
61
33
|
---
|
|
62
|
-
title:
|
|
63
|
-
description:
|
|
64
|
-
navigation:
|
|
65
|
-
label: About
|
|
66
|
-
order: 20
|
|
34
|
+
title: My Gallery
|
|
35
|
+
description: A small gallery site.
|
|
67
36
|
sections:
|
|
68
37
|
- id: intro
|
|
69
38
|
---
|
|
@@ -73,83 +42,89 @@ sections:
|
|
|
73
42
|
Text...
|
|
74
43
|
```
|
|
75
44
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
## Sections
|
|
46
|
+
|
|
47
|
+
Each `sections[]` item has:
|
|
48
|
+
|
|
49
|
+
- `id`: required string matching `^[a-z0-9-]+$`. Used for anchors, navigation,
|
|
50
|
+
image directories, and Markdown heading ids.
|
|
51
|
+
- `visible`: optional date window that controls whether the section is rendered.
|
|
52
|
+
- `presentation`: optional section-level visual overrides.
|
|
53
|
+
- `gallery`: optional array, defaulting to `[]`.
|
|
80
54
|
|
|
81
|
-
|
|
55
|
+
Example:
|
|
82
56
|
|
|
83
|
-
```
|
|
84
|
-
|
|
57
|
+
```yaml
|
|
58
|
+
sections:
|
|
59
|
+
- id: work
|
|
60
|
+
gallery:
|
|
61
|
+
- image: work.jpg
|
|
62
|
+
alt: "A woven artwork on a white wall."
|
|
63
|
+
caption: "Work in progress."
|
|
85
64
|
```
|
|
86
65
|
|
|
87
|
-
|
|
66
|
+
Every frontmatter section must have a matching level 2 Markdown heading with an
|
|
67
|
+
explicit id:
|
|
88
68
|
|
|
89
|
-
|
|
69
|
+
```md
|
|
70
|
+
## Work {#work}
|
|
90
71
|
|
|
91
|
-
|
|
92
|
-
|
|
72
|
+
Introductory text.
|
|
73
|
+
```
|
|
93
74
|
|
|
94
|
-
|
|
95
|
-
- A small multi-page site may use site navigation between routes plus page
|
|
96
|
-
navigation between sections on the current page.
|
|
97
|
-
- If a site needs many routes, deeply nested routes, or several navigation
|
|
98
|
-
levels, it has probably outgrown the current sticky-navigation model and may
|
|
99
|
-
need a different site structure or navigation system.
|
|
75
|
+
Keep these values aligned:
|
|
100
76
|
|
|
101
|
-
|
|
77
|
+
- the frontmatter `sections[].id`
|
|
78
|
+
- the Markdown heading id
|
|
79
|
+
- the source image directory `site/images/<section-id>/`
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
engine defaults are used.
|
|
81
|
+
The visible section navigation label comes from the Markdown heading text, not
|
|
82
|
+
from the frontmatter id.
|
|
106
83
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
configuration is the uncommented YAML below it.
|
|
84
|
+
## Galleries
|
|
85
|
+
|
|
86
|
+
Each gallery row can contain a single image:
|
|
111
87
|
|
|
112
88
|
```yaml
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
presentation:
|
|
119
|
-
backgroundColor: "#000000"
|
|
120
|
-
textColor: "#f7f4ee"
|
|
121
|
-
inlineStyles:
|
|
122
|
-
highlight:
|
|
123
|
-
color: "#ffd84d"
|
|
124
|
-
typography:
|
|
125
|
-
preset: quiet-gallery
|
|
126
|
-
frame:
|
|
127
|
-
colors: presentation
|
|
128
|
-
---
|
|
89
|
+
gallery:
|
|
90
|
+
- image: work.jpg
|
|
91
|
+
alt: "A woven artwork on a white wall."
|
|
92
|
+
caption: "Work in progress."
|
|
129
93
|
```
|
|
130
94
|
|
|
131
|
-
|
|
132
|
-
hex colors in `#rgb`, `#rrggbb`, or `#rrggbbaa` form.
|
|
95
|
+
Image rows support:
|
|
133
96
|
|
|
134
|
-
`
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
97
|
+
- `image`: required filename matching `^[a-z0-9][a-z0-9.-]*\.(jpe?g|png)$`.
|
|
98
|
+
It must be a filename, not a path.
|
|
99
|
+
- `alt`: required string.
|
|
100
|
+
- `caption`: optional string.
|
|
138
101
|
|
|
139
|
-
|
|
102
|
+
Source image filenames must be unique across the selected page's image tree.
|
|
103
|
+
The homepage reads images from `site/images/<section-id>/`. Route pages read
|
|
104
|
+
images from `site/routes/<route-folder>/images/<section-id>/`.
|
|
140
105
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- explicit colors:
|
|
106
|
+
## Carousels
|
|
107
|
+
|
|
108
|
+
A gallery row can contain a carousel instead of a single image:
|
|
145
109
|
|
|
146
110
|
```yaml
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
111
|
+
gallery:
|
|
112
|
+
- carousel:
|
|
113
|
+
- image: first.jpg
|
|
114
|
+
alt: "First image."
|
|
115
|
+
caption: "First caption."
|
|
116
|
+
- image: second.jpg
|
|
117
|
+
alt: "Second image."
|
|
118
|
+
caption: "Second caption."
|
|
151
119
|
```
|
|
152
120
|
|
|
121
|
+
Each carousel item has the same `image`, `alt`, and `caption` fields as a
|
|
122
|
+
single image row.
|
|
123
|
+
|
|
124
|
+
`content:check` warns when carousel images have different aspect ratios. Exact
|
|
125
|
+
matching proportions are recommended because mixed proportions can make the
|
|
126
|
+
layout move while the user changes slides.
|
|
127
|
+
|
|
153
128
|
## Temporary Sections
|
|
154
129
|
|
|
155
130
|
Use `sections[].visible` for sections that should be rendered only during a
|
|
@@ -171,171 +146,37 @@ Both `from` and `until` use `YYYY-MM-DD`. Either value may be omitted, but a
|
|
|
171
146
|
`visible` object must contain at least one of them.
|
|
172
147
|
|
|
173
148
|
Hidden sections are omitted from the rendered HTML and sticky navigation. They
|
|
174
|
-
remain in
|
|
149
|
+
remain in the page file, and `content:check` still validates their matching
|
|
175
150
|
Markdown headings and gallery image references.
|
|
176
151
|
|
|
177
|
-
The current date is evaluated at dev/build time. Set `NORNA_TODAY` to
|
|
178
|
-
|
|
152
|
+
The current date is evaluated at dev/build time. Set `NORNA_TODAY` to preview
|
|
153
|
+
or test a specific date:
|
|
179
154
|
|
|
180
155
|
```sh
|
|
181
156
|
NORNA_TODAY=2026-08-15 npm run norna:build
|
|
182
157
|
```
|
|
183
158
|
|
|
184
|
-
##
|
|
159
|
+
## Markdown Text
|
|
185
160
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
presentation belongs under `sections[].presentation`.
|
|
189
|
-
|
|
190
|
-
If a page omits `presentation`, it uses the theme presentation unchanged. If a
|
|
191
|
-
section omits `presentation`, it uses the resolved page presentation.
|
|
192
|
-
|
|
193
|
-
```yaml
|
|
194
|
-
presentation:
|
|
195
|
-
typography:
|
|
196
|
-
overrides:
|
|
197
|
-
body:
|
|
198
|
-
paragraphSpacing: 1em
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### Typography Presets
|
|
202
|
-
|
|
203
|
-
Typographic presentation is configured through presets with optional overrides:
|
|
204
|
-
|
|
205
|
-
```yaml
|
|
206
|
-
presentation:
|
|
207
|
-
typography:
|
|
208
|
-
preset: quiet-gallery
|
|
209
|
-
overrides:
|
|
210
|
-
body:
|
|
211
|
-
paragraphSpacing: 0.8em
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Available presets:
|
|
215
|
-
|
|
216
|
-
- `quiet-gallery`: the default for image-led art and portfolio sites. Text is
|
|
217
|
-
restrained and supports the images without dominating the page.
|
|
218
|
-
- `compact-gallery`: tighter typography for many sections, many images, or
|
|
219
|
-
short information blocks.
|
|
220
|
-
- `text-forward`: more generous body text for pages where longer text carries
|
|
221
|
-
more of the experience.
|
|
222
|
-
- `statement`: stronger type for introductions, first sections, and short
|
|
223
|
-
programmatic statements. Use it sparingly, usually as a section override.
|
|
224
|
-
|
|
225
|
-
The normal place to choose a site-wide preset is `site/theme.md`. If theme
|
|
226
|
-
typography is omitted, `quiet-gallery` is used. A page-level
|
|
227
|
-
`presentation.typography.preset` changes the typographic base for the page. A
|
|
228
|
-
section-level `sections[].presentation.typography.preset` changes the
|
|
229
|
-
typographic base for that section.
|
|
230
|
-
|
|
231
|
-
Use this command to inspect the exact preset values shipped with the installed
|
|
232
|
-
engine:
|
|
233
|
-
|
|
234
|
-
```sh
|
|
235
|
-
norna typography:presets
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
Use this command to inspect the effective values for the selected site after
|
|
239
|
-
presets and overrides have been applied:
|
|
240
|
-
|
|
241
|
-
```sh
|
|
242
|
-
norna typography:show
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
The typographic roles are:
|
|
246
|
-
|
|
247
|
-
- `heading`: section headings.
|
|
248
|
-
- `body`: Markdown body text inside sections.
|
|
249
|
-
- `caption`: gallery captions.
|
|
250
|
-
|
|
251
|
-
Allowed alignment values are `left`, `center`, and `right`. Alignment can be
|
|
252
|
-
responsive:
|
|
253
|
-
|
|
254
|
-
```yaml
|
|
255
|
-
align:
|
|
256
|
-
desktop: left
|
|
257
|
-
mobile: center
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Allowed size values are `small`, `medium`, `large`, and `xlarge`.
|
|
261
|
-
`lineHeight` is a unitless number from `1` through `3`. `spacing` and
|
|
262
|
-
`paragraphSpacing` are CSS lengths such as `0`, `0.8em`, `1rem`, or `12px`.
|
|
263
|
-
|
|
264
|
-
Supported override fields:
|
|
265
|
-
|
|
266
|
-
- `heading.align`, `heading.size`, `heading.lineHeight`, `heading.spacing`
|
|
267
|
-
- `body.align`, `body.size`, `body.lineHeight`, `body.paragraphSpacing`
|
|
268
|
-
- `caption.align`, `caption.size`, `caption.lineHeight`, `caption.spacing`
|
|
269
|
-
|
|
270
|
-
Use `site/theme.md` `presentation.inlineStyles` for named inline text styles
|
|
271
|
-
that can be applied inside Markdown:
|
|
272
|
-
|
|
273
|
-
```yaml
|
|
274
|
-
presentation:
|
|
275
|
-
inlineStyles:
|
|
276
|
-
highlight:
|
|
277
|
-
color: "#ffd84d"
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
Apply an inline style in Markdown with `[text]{.style-name}`:
|
|
161
|
+
Section Markdown starts at the matching level 2 heading and continues until the
|
|
162
|
+
next level 2 heading.
|
|
281
163
|
|
|
282
164
|
```md
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
`content:check` fails if Markdown uses an inline style that is not defined in
|
|
287
|
-
`site/theme.md` `presentation.inlineStyles`.
|
|
165
|
+
## Intro {#intro}
|
|
288
166
|
|
|
289
|
-
|
|
167
|
+
Paragraph text.
|
|
290
168
|
|
|
291
|
-
|
|
292
|
-
sections:
|
|
293
|
-
- id: intro
|
|
294
|
-
presentation:
|
|
295
|
-
backgroundColor: "#161616"
|
|
296
|
-
textColor: "#ffffff"
|
|
297
|
-
typography:
|
|
298
|
-
preset: statement
|
|
299
|
-
overrides:
|
|
300
|
-
body:
|
|
301
|
-
paragraphSpacing: 0.7em
|
|
169
|
+
Another paragraph.
|
|
302
170
|
```
|
|
303
171
|
|
|
304
|
-
|
|
305
|
-
a section only sets `typography.overrides`, it keeps the resolved page preset
|
|
306
|
-
and changes only the specified values.
|
|
307
|
-
|
|
308
|
-
Centered text uses narrower text widths. Left- or right-aligned heading and body
|
|
309
|
-
text use the calculated gallery layout width so text edges line up with gallery
|
|
310
|
-
images after layout gutters and gallery limits are applied.
|
|
311
|
-
Configured section backgrounds render as full-width horizontal bands while the
|
|
312
|
-
section content keeps the normal page and gallery widths. The top spacing
|
|
313
|
-
before the first heading, the spacing between sections, and the spacing after
|
|
314
|
-
the final section are part of the section background. The sticky section
|
|
315
|
-
navigation row and footer use the resolved frame colors, not section-specific
|
|
316
|
-
presentation.
|
|
317
|
-
Configured section text colors apply to section headings, Markdown text,
|
|
318
|
-
Markdown subheadings, and gallery captions. Links keep the global accent color.
|
|
319
|
-
|
|
320
|
-
## Markdown Sections
|
|
321
|
-
|
|
322
|
-
Every frontmatter section must have a matching level 2 Markdown heading with an
|
|
323
|
-
explicit id:
|
|
172
|
+
Inline styles use this Markdown form:
|
|
324
173
|
|
|
325
174
|
```md
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
Introductory text.
|
|
175
|
+
This sentence contains [highlighted text]{.highlight}.
|
|
329
176
|
```
|
|
330
177
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
- the frontmatter `sections[].id`
|
|
334
|
-
- the Markdown heading id
|
|
335
|
-
- the source image directory `site/images/<section-id>/`
|
|
336
|
-
|
|
337
|
-
The visible navigation label comes from the Markdown heading text, not from the
|
|
338
|
-
frontmatter id.
|
|
178
|
+
Inline style definitions live in `site/theme.md`. See
|
|
179
|
+
[Theme](theme.md#inline-styles).
|
|
339
180
|
|
|
340
181
|
## Validation And Sync
|
|
341
182
|
|
|
@@ -352,8 +193,8 @@ frontmatter indentation and structure mistakes.
|
|
|
352
193
|
|
|
353
194
|
Frontmatter uses YAML indentation. Use ordinary spaces, not tabs or
|
|
354
195
|
non-breaking spaces. `content:check` reports a focused error when indentation is
|
|
355
|
-
invalid, when a key is indented under a line that already has a value, or when
|
|
356
|
-
|
|
196
|
+
invalid, when a key is indented under a line that already has a value, or when a
|
|
197
|
+
known nested key such as `gallery` appears at the top level:
|
|
357
198
|
|
|
358
199
|
```yaml
|
|
359
200
|
typography:
|
|
@@ -363,9 +204,9 @@ typography:
|
|
|
363
204
|
paragraphSpacing: 0.8em
|
|
364
205
|
```
|
|
365
206
|
|
|
366
|
-
Top-level page frontmatter may contain only `title`, `description`,
|
|
367
|
-
`presentation`, `frame`, and `sections`. A `gallery` key belongs
|
|
368
|
-
`sections[]` item:
|
|
207
|
+
Top-level page frontmatter may contain only `title`, `description`, `slug`,
|
|
208
|
+
`navigation`, `presentation`, `frame`, and `sections`. A `gallery` key belongs
|
|
209
|
+
under one `sections[]` item:
|
|
369
210
|
|
|
370
211
|
```yaml
|
|
371
212
|
sections:
|
|
@@ -86,12 +86,15 @@ Examples:
|
|
|
86
86
|
npm run release:patch
|
|
87
87
|
npm run release:minor
|
|
88
88
|
npm run release:major
|
|
89
|
-
npm run release:publish
|
|
90
89
|
```
|
|
91
90
|
|
|
92
|
-
These commands change
|
|
91
|
+
These commands change and publish the reusable `@janga/norna` package.
|
|
93
92
|
They must not be part of ordinary site repositories.
|
|
94
93
|
|
|
94
|
+
`npm run release:publish` is a low-level script used by the release command
|
|
95
|
+
after the version has already been bumped. It is not the normal release entry
|
|
96
|
+
point.
|
|
97
|
+
|
|
95
98
|
### Direct CLI Commands
|
|
96
99
|
|
|
97
100
|
The `norna` binary is the stable low-level command surface.
|
|
@@ -157,7 +160,6 @@ In the engine repository, version changes belong to `release:*`:
|
|
|
157
160
|
|
|
158
161
|
```sh
|
|
159
162
|
npm run release:minor
|
|
160
|
-
npm run release:publish
|
|
161
163
|
```
|
|
162
164
|
|
|
163
165
|
### Initialize A Gallery Project Directory
|
|
@@ -231,7 +233,7 @@ npm run norna:dev:stop
|
|
|
231
233
|
The shorter `norna:dev` starts the normal local server. Subcommands manage
|
|
232
234
|
the same server.
|
|
233
235
|
|
|
234
|
-
In the engine repository, engine
|
|
236
|
+
In the engine repository, engine and example development may use the engine's own
|
|
235
237
|
unprefixed commands:
|
|
236
238
|
|
|
237
239
|
```sh
|
|
@@ -360,7 +362,9 @@ gallery, they should call `norna:*` scripts internally.
|
|
|
360
362
|
Engine publishing uses `release:*`, not `norna:*`:
|
|
361
363
|
|
|
362
364
|
```sh
|
|
363
|
-
npm run release:
|
|
365
|
+
npm run release:patch
|
|
366
|
+
npm run release:minor
|
|
367
|
+
npm run release:major
|
|
364
368
|
```
|
|
365
369
|
|
|
366
370
|
### Monitor Publishing
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
# Site Examples Structure
|
|
1
|
+
# Site Examples Structure
|
|
2
2
|
|
|
3
|
-
This
|
|
4
|
-
|
|
5
|
-
note, not an implementation record.
|
|
3
|
+
This document defines the repository vocabulary for starter files, example
|
|
4
|
+
sites, fixtures, and documentation sites.
|
|
6
5
|
|
|
7
6
|
## Goal
|
|
8
7
|
|
|
@@ -10,8 +9,8 @@ note, not an implementation record.
|
|
|
10
9
|
files are product documentation, which files are examples, and which files are
|
|
11
10
|
test fixtures.
|
|
12
11
|
|
|
13
|
-
The
|
|
14
|
-
|
|
12
|
+
The repository grew from one local demo, one starter, and a set of tests. The
|
|
13
|
+
current structure keeps those roles separate.
|
|
15
14
|
|
|
16
15
|
## Terms
|
|
17
16
|
|
|
@@ -57,30 +56,31 @@ for human reading or visual appeal.
|
|
|
57
56
|
|
|
58
57
|
## Intended Direction
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
example:
|
|
59
|
+
Runnable site examples are collected under `examples/`:
|
|
62
60
|
|
|
63
61
|
```text
|
|
64
|
-
|
|
65
|
-
starter-basic/
|
|
62
|
+
examples/
|
|
66
63
|
dog-gallery/
|
|
67
64
|
routes-demo/
|
|
68
65
|
typography-demo/
|
|
69
|
-
docs-site/
|
|
70
66
|
```
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
Only `dog-gallery/` exists today. Additional examples should be added when
|
|
69
|
+
they demonstrate a distinct feature or workflow.
|
|
73
70
|
|
|
74
|
-
- `
|
|
75
|
-
|
|
71
|
+
- `dog-gallery/`: current local visual demo, manual inspection site, and
|
|
72
|
+
navigation diagnostic target.
|
|
76
73
|
- `routes-demo/`: focused route/navigation example if dog-gallery becomes too
|
|
77
74
|
broad.
|
|
78
75
|
- `typography-demo/`: focused typography preset and override example if needed.
|
|
79
|
-
- `docs-site/`: visual documentation built with `norna`.
|
|
80
76
|
|
|
77
|
+
The repository-local `site/` directory is reserved for the documentation site.
|
|
81
78
|
`docs/` should remain for reference documentation. It should link to the
|
|
82
79
|
documentation site when visual explanation is more useful than reference text.
|
|
83
80
|
|
|
81
|
+
`starters/basic/` stays separate from examples because it is copied by
|
|
82
|
+
`norna init`. It should stay small and conservative.
|
|
83
|
+
|
|
84
84
|
Fixtures may either stay under `fixtures/` or move under a clearly named test
|
|
85
85
|
area later. They should not be confused with examples.
|
|
86
86
|
|
|
@@ -94,12 +94,7 @@ area later. They should not be confused with examples.
|
|
|
94
94
|
|
|
95
95
|
## Open Decisions
|
|
96
96
|
|
|
97
|
-
- Exact top-level directory name: `sites/`, `examples/`, or another name.
|
|
98
|
-
- Whether `starter-basic/` belongs beside examples or in a separate template
|
|
99
|
-
area.
|
|
100
|
-
- Whether the current dog-gallery remains the primary manual test site or
|
|
101
|
-
becomes one example among several.
|
|
102
97
|
- Whether the documentation site should be published anywhere, or exist only as
|
|
103
98
|
a local/example build.
|
|
104
|
-
- How
|
|
105
|
-
|
|
99
|
+
- How local example selection should work when there are multiple runnable
|
|
100
|
+
examples.
|