@janga/norna 0.7.0 → 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.
Files changed (63) hide show
  1. package/README.md +18 -4
  2. package/astro.config.mjs +2 -0
  3. package/bin/norna-cli.mjs +170 -0
  4. package/bin/norna.mjs +149 -150
  5. package/docs/README.md +36 -16
  6. package/docs/commands.md +18 -5
  7. package/docs/configuration.md +37 -2
  8. package/docs/content.md +98 -257
  9. package/docs/{command-organization.md → design/command-organization.md} +9 -5
  10. package/docs/{site-examples-structure-note.md → design/site-examples-structure.md} +17 -22
  11. package/docs/engine-development.md +33 -5
  12. package/docs/getting-started.md +40 -4
  13. package/docs/local-development.md +13 -0
  14. package/docs/publishing.md +23 -0
  15. package/docs/routes.md +90 -0
  16. package/docs/site-structure.md +15 -8
  17. package/docs/theme.md +150 -0
  18. package/docs/typography.md +125 -0
  19. package/examples/dog-gallery/site/.norna/generated-images.json +226 -0
  20. package/examples/dog-gallery/site/config.mjs +97 -0
  21. package/examples/dog-gallery/site/content.md +146 -0
  22. package/examples/dog-gallery/site/images/black-dogs/black-puppy-meadow.png +0 -0
  23. package/examples/dog-gallery/site/images/black-dogs/photo-of-a-black-dog.jpg +0 -0
  24. package/examples/dog-gallery/site/images/brown-dogs/brown-dog.jpg +0 -0
  25. package/examples/dog-gallery/site/images/brown-dogs/dog-accompanies-master.jpg +0 -0
  26. package/examples/dog-gallery/site/images/golden-dogs/golden-retriever.jpg +0 -0
  27. package/examples/dog-gallery/site/images/golden-dogs/toller-puppy.jpg +0 -0
  28. package/examples/dog-gallery/site/images/white-dogs/white-cute-dog.jpg +0 -0
  29. package/examples/dog-gallery/site/images/white-dogs/white-puppy-garden.png +0 -0
  30. package/examples/dog-gallery/site/public/favicon.svg +7 -0
  31. package/examples/dog-gallery/site/public/robots.txt +2 -0
  32. package/examples/dog-gallery/site/routes/dog-care/route-content.md +35 -0
  33. package/examples/dog-gallery/site/theme.md +55 -0
  34. package/fixtures/basic/site/config.mjs +1 -0
  35. package/package.json +8 -7
  36. package/scripts/check-config.mjs +1 -0
  37. package/scripts/dev-local.mjs +64 -15
  38. package/scripts/init-site.mjs +1 -1
  39. package/scripts/lib/project-config.mjs +22 -0
  40. package/scripts/lib/site-content.mjs +2 -1
  41. package/scripts/lib/site-paths.mjs +18 -3
  42. package/scripts/lib/typography.mjs +5 -5
  43. package/scripts/show-typography.mjs +252 -29
  44. package/scripts/test-cli-discovery.mjs +124 -0
  45. package/scripts/test-engine-commands.mjs +18 -4
  46. package/scripts/test-navigation.mjs +10 -6
  47. package/scripts/test-package-check.mjs +32 -4
  48. package/src/components/SiteNavigation.astro +7 -5
  49. package/src/components/SitePage.astro +3 -0
  50. package/src/components/SiteSection.astro +24 -24
  51. package/src/content.config.ts +4 -0
  52. package/src/layouts/BaseLayout.astro +2 -1
  53. package/src/lib/basePath.ts +21 -0
  54. package/src/lib/generatedImages.ts +8 -4
  55. package/src/lib/sectionContent.ts +6 -1
  56. package/src/lib/sitePublicAssets.ts +8 -1
  57. package/src/styles/global.css +8 -8
  58. package/starters/basic/.github/workflows/deploy.yml +3 -3
  59. package/starters/basic/README.md +21 -0
  60. package/starters/basic/package.json +1 -1
  61. package/starters/basic/site/config.mjs +1 -0
  62. package/starters/basic/site/content.md +5 -3
  63. package/starters/basic/site/theme.md +4 -0
@@ -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 output
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 editable page file for the homepage of a
4
- `norna` site. Optional route pages use
5
- `site/routes/<route-folder>/route-content.md` with the same page frontmatter and
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
- Site-wide visual defaults may live in `site/theme.md`. Technical site
9
- configuration lives in `site/config.mjs`.
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
- ## Frontmatter Schema
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
- - `frame`: optional page-level frame color source.
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
- `navigation` may contain:
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: About
63
- description: About this gallery.
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
- The example above builds to `/about/`. If `slug` is omitted, the route folder
77
- name is used. If `slug` is set, it must use lowercase letters, numbers, and
78
- hyphens. Keep the route folder and `slug` aligned unless you intentionally need
79
- a different URL.
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
- Route images live under the route:
55
+ Example:
82
56
 
83
- ```text
84
- site/routes/about/images/intro/image.jpg
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
- Image references in route frontmatter still use only the filename.
66
+ Every frontmatter section must have a matching level 2 Markdown heading with an
67
+ explicit id:
88
68
 
89
- ### Navigation Scope
69
+ ```md
70
+ ## Work {#work}
90
71
 
91
- Current route navigation is intended for small sites. This guidance may change
92
- as route support matures, but the present model is:
72
+ Introductory text.
73
+ ```
93
74
 
94
- - A single-page site should normally use only page navigation between sections.
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
- ## Site Theme
77
+ - the frontmatter `sections[].id`
78
+ - the Markdown heading id
79
+ - the source image directory `site/images/<section-id>/`
102
80
 
103
- `site/theme.md` optionally defines site-wide visual defaults. It uses
104
- frontmatter and does not need a Markdown body. If the file is missing, built-in
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
- Starter sites include a marked comment block such as
108
- `norna:start theme-help` / `norna:end theme-help`. The block is
109
- only explorable help text; YAML comments do not affect rendering. The active
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
- # norna:start theme-help
115
- # Site-wide visual defaults. Remove a value to use the engine default.
116
- # norna:end theme-help
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
- `presentation.backgroundColor` and `presentation.textColor` are optional quoted
132
- hex colors in `#rgb`, `#rrggbb`, or `#rrggbbaa` form.
95
+ Image rows support:
133
96
 
134
- `presentation.inlineStyles` defines named inline text styles that can be used
135
- from Markdown. Inline style names must match `^[a-z][a-z0-9-]*$`. Each style
136
- currently supports a required `color` field using the same quoted hex color
137
- format as `textColor`.
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
- `frame.colors` controls the sticky navigation and footer colors:
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
- - `presentation`: use the resolved presentation colors for this level.
142
- - `theme`: use the site theme frame colors. This is useful in page-level
143
- frontmatter.
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
- frame:
148
- colors:
149
- backgroundColor: "#111111"
150
- textColor: "#eeeeee"
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 `content.md`, and `content:check` still validates their matching
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
- preview or test a specific date:
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
- ## Presentation
159
+ ## Markdown Text
185
160
 
186
- Site-wide presentation belongs in `site/theme.md`. Page-level presentation in
187
- `site/content.md` is always an override on top of the theme. Section-specific
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
- This sentence contains [highlighted text]{.highlight}.
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
- `sections[].presentation` contains only section-specific differences:
167
+ Paragraph text.
290
168
 
291
- ```yaml
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
- If a section sets `typography.preset`, that section starts from that preset. If
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
- ## Work {#work}
327
-
328
- Introductory text.
175
+ This sentence contains [highlighted text]{.highlight}.
329
176
  ```
330
177
 
331
- Keep these values aligned:
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
- a known nested key such as `gallery` appears at the top level:
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 under one
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 or publish the reusable `@janga/norna` package.
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/demo development may use the engine's own
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:publish
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 Note
1
+ # Site Examples Structure
2
2
 
3
- This note defines the intended repository vocabulary before reorganizing
4
- starter files, demo sites, fixtures, and documentation sites. It is a design
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 current repository grew from one local demo, one starter, and a set of
14
- tests. A future structure should keep those roles separate.
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
- A future structure should collect runnable site examples in one place, for
61
- example:
59
+ Runnable site examples are collected under `examples/`:
62
60
 
63
61
  ```text
64
- sites/
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
- The exact names can change, but the roles should remain clear:
68
+ Only `dog-gallery/` exists today. Additional examples should be added when
69
+ they demonstrate a distinct feature or workflow.
73
70
 
74
- - `starter-basic/`: copied by `norna init`.
75
- - `dog-gallery/`: local visual demo and manual inspection site.
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 demo selection should work in npm scripts, for example
105
- `npm run demo:dev -- dog-gallery`.
99
+ - How local example selection should work when there are multiple runnable
100
+ examples.