@janga/norna 0.7.7 → 0.7.9

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 (86) hide show
  1. package/README.md +6 -5
  2. package/docs/README.md +5 -1
  3. package/docs/commands.md +4 -3
  4. package/docs/configuration.md +1 -1
  5. package/docs/content.md +64 -14
  6. package/docs/design/norna-diagram-design.md +156 -0
  7. package/docs/getting-started.md +48 -7
  8. package/docs/images-and-metadata.md +11 -6
  9. package/docs/routes.md +14 -3
  10. package/docs/site-structure.md +6 -3
  11. package/docs/theme.md +7 -4
  12. package/docs/typography.md +4 -5
  13. package/examples/dog-gallery/site/content.md +1 -36
  14. package/examples/dog-gallery/site/routes/010-dog-care/route-content.md +0 -8
  15. package/examples/typography-presets/.astro/collections/site.schema.json +776 -0
  16. package/examples/typography-presets/.astro/collections/theme.schema.json +668 -0
  17. package/examples/typography-presets/.astro/content-assets.mjs +4 -0
  18. package/examples/typography-presets/.astro/content-modules.mjs +1 -0
  19. package/examples/typography-presets/.astro/content.d.ts +175 -0
  20. package/examples/typography-presets/.astro/data-store.json +1 -0
  21. package/examples/typography-presets/.astro/dev-local.json +8 -0
  22. package/examples/typography-presets/.astro/dev.json +15 -0
  23. package/examples/typography-presets/.astro/dev.log +24 -0
  24. package/examples/typography-presets/.astro/settings.json +5 -0
  25. package/examples/typography-presets/.astro/types.d.ts +2 -0
  26. package/examples/typography-presets/node_modules/.vite/deps/_metadata.json +80 -0
  27. package/examples/typography-presets/node_modules/.vite/deps/astro-D_GIpJIE.js +434 -0
  28. package/examples/typography-presets/node_modules/.vite/deps/astro-D_GIpJIE.js.map +1 -0
  29. package/examples/typography-presets/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
  30. package/examples/typography-presets/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
  31. package/examples/typography-presets/node_modules/.vite/deps/astro_n_axobject-query.js +2702 -0
  32. package/examples/typography-presets/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
  33. package/examples/typography-presets/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
  34. package/examples/typography-presets/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
  35. package/examples/typography-presets/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
  36. package/examples/typography-presets/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
  37. package/examples/typography-presets/node_modules/.vite/deps/audit-DM9Hkl5B.js +1534 -0
  38. package/examples/typography-presets/node_modules/.vite/deps/audit-DM9Hkl5B.js.map +1 -0
  39. package/examples/typography-presets/node_modules/.vite/deps/embla-carousel.js +1389 -0
  40. package/examples/typography-presets/node_modules/.vite/deps/embla-carousel.js.map +1 -0
  41. package/examples/typography-presets/node_modules/.vite/deps/highlight-DnZ1ULOL.js +48 -0
  42. package/examples/typography-presets/node_modules/.vite/deps/highlight-DnZ1ULOL.js.map +1 -0
  43. package/examples/typography-presets/node_modules/.vite/deps/icons-RyebKi45.js +42 -0
  44. package/examples/typography-presets/node_modules/.vite/deps/icons-RyebKi45.js.map +1 -0
  45. package/examples/typography-presets/node_modules/.vite/deps/package.json +3 -0
  46. package/examples/typography-presets/node_modules/.vite/deps/rolldown-runtime-BvCyGRYZ.js +4 -0
  47. package/examples/typography-presets/node_modules/.vite/deps/settings-DaU-gNnK.js +190 -0
  48. package/examples/typography-presets/node_modules/.vite/deps/settings-DaU-gNnK.js.map +1 -0
  49. package/examples/typography-presets/node_modules/.vite/deps/toolbar-63PA619H.js +458 -0
  50. package/examples/typography-presets/node_modules/.vite/deps/toolbar-63PA619H.js.map +1 -0
  51. package/examples/typography-presets/node_modules/.vite/deps/ui-library--bkcNSYz.js +1016 -0
  52. package/examples/typography-presets/node_modules/.vite/deps/ui-library--bkcNSYz.js.map +1 -0
  53. package/examples/typography-presets/node_modules/.vite/deps/window-jPkpKVcy.js +32 -0
  54. package/examples/typography-presets/node_modules/.vite/deps/window-jPkpKVcy.js.map +1 -0
  55. package/examples/typography-presets/node_modules/.vite/deps/xray-BXCHpEJP.js +111 -0
  56. package/examples/typography-presets/node_modules/.vite/deps/xray-BXCHpEJP.js.map +1 -0
  57. package/examples/typography-presets/site/.norna/generated-images.json +290 -0
  58. package/examples/typography-presets/site/config.mjs +42 -0
  59. package/examples/typography-presets/site/content.md +134 -0
  60. package/examples/typography-presets/site/images/compact-gallery/black-schnauzer.jpg +0 -0
  61. package/examples/typography-presets/site/images/compact-gallery/retriever-portrait.jpg +0 -0
  62. package/examples/typography-presets/site/images/compact-gallery/schnauzer-portrait.jpg +0 -0
  63. package/examples/typography-presets/site/images/quiet-gallery/puppy-portrait.jpg +0 -0
  64. package/examples/typography-presets/site/images/quiet-gallery/shepherd-portrait.jpg +0 -0
  65. package/examples/typography-presets/site/images/quiet-gallery/white-puppy.jpg +0 -0
  66. package/examples/typography-presets/site/images/statement/black-pedigree.jpg +0 -0
  67. package/examples/typography-presets/site/images/statement/sheepdog-grass.jpg +0 -0
  68. package/examples/typography-presets/site/images/statement/sheepdog-wide.jpg +0 -0
  69. package/examples/typography-presets/site/images/text-forward/boxer-portrait.jpg +0 -0
  70. package/examples/typography-presets/site/images/text-forward/grass-puppy.jpg +0 -0
  71. package/examples/typography-presets/site/images/text-forward/grey-street-dog.jpg +0 -0
  72. package/examples/typography-presets/site/public/robots.txt +2 -0
  73. package/examples/typography-presets/site/theme.md +43 -0
  74. package/package.json +1 -1
  75. package/scripts/lib/site-content.mjs +76 -0
  76. package/scripts/lib/theme-config.mjs +2 -0
  77. package/scripts/sync-content-sections.mjs +158 -22
  78. package/scripts/test-content-check.mjs +31 -1
  79. package/scripts/test-content-model-v2.mjs +238 -6
  80. package/scripts/test-package-check.mjs +17 -0
  81. package/src/components/SiteSection.astro +1 -1
  82. package/src/lib/sectionContent.ts +10 -2
  83. package/src/styles/global.css +1 -1
  84. package/starters/basic/README.md +4 -2
  85. package/starters/basic/site/content.md +2 -8
  86. package/starters/project/README.md +7 -3
package/README.md CHANGED
@@ -25,12 +25,13 @@ A `norna` site is file-driven:
25
25
  base path, in `site/config.mjs`.
26
26
  3. The site keeps site-wide visual theme defaults, including layout, image
27
27
  sizing, font, typography, colors, and frame colors, in `site/theme.md`.
28
- 4. The site keeps homepage content, Markdown section order, image blocks, alt
29
- text, captions, and optional section metadata in `site/content.md`.
28
+ 4. The site keeps homepage content, Markdown section order, managed media
29
+ blocks, alt text, captions, and optional section metadata in
30
+ `site/content.md`.
30
31
  5. Optional route pages live under
31
- `site/routes/<route-folder>/route-content.md`.
32
+ `site/routes/<NNN-route-id>/route-content.md`.
32
33
  6. Source images live under `site/images/<section-id>/` for the homepage, or
33
- under `site/routes/<route-folder>/images/<section-id>/` for a route.
34
+ under `site/routes/<NNN-route-id>/images/<section-id>/` for a route.
34
35
  7. Static public files live under `site/public/`.
35
36
  8. `norna` validates the files, prepares managed images, builds static Astro
36
37
  pages, and can help publish the committed branch through GitHub Pages.
@@ -75,7 +76,7 @@ Actions use the same engine version.
75
76
 
76
77
  - Create a site: [Getting Started](docs/getting-started.md)
77
78
  - Understand required site files: [Site Structure](docs/site-structure.md)
78
- - Edit sections and image blocks: [Content](docs/content.md)
79
+ - Edit sections and managed media blocks: [Content](docs/content.md)
79
80
  - Configure a site: [Configuration](docs/configuration.md)
80
81
  - Publish under a GitHub Pages project path:
81
82
  [`site.basePath`](docs/configuration.md#sitebasepath)
package/docs/README.md CHANGED
@@ -32,6 +32,7 @@ For design and naming principles:
32
32
 
33
33
  1. [Command Organization](design/command-organization.md)
34
34
  2. [Site Examples Structure](design/site-examples-structure.md)
35
+ 3. [Norna Diagram Design](design/norna-diagram-design.md)
35
36
 
36
37
  For a quick reference:
37
38
 
@@ -39,7 +40,7 @@ For a quick reference:
39
40
  fields such as URL, base path, locale labels, footer, GitHub, and deploy
40
41
  settings.
41
42
  - [Content](content.md) describes page frontmatter, Markdown-authored
42
- sections, optional section metadata, image stacks, carousels, temporary
43
+ sections, optional section metadata, managed media blocks, temporary
43
44
  sections, and content validation.
44
45
  - [Theme](theme.md) describes site-wide layout, layout density, image sizing,
45
46
  font, typography rhythm, presentation colors, frame colors, and inline styles.
@@ -58,6 +59,9 @@ Design documents are intentionally separate from the user reference:
58
59
  - [Site Examples Structure](design/site-examples-structure.md) defines the
59
60
  intended vocabulary for starters, examples, documentation sites, reference
60
61
  docs, and fixtures.
62
+ - [Norna Diagram Design](design/norna-diagram-design.md) defines the first
63
+ experiment for technical and pedagogical diagrams without adding external
64
+ diagram tooling to the build pipeline.
61
65
 
62
66
  Site repositories should document only their site-specific choices and link here
63
67
  for generic `norna` behavior.
package/docs/commands.md CHANGED
@@ -101,10 +101,11 @@ should normally mean the repository's complete publishable artifact, while
101
101
  cache path.
102
102
  - `config:check`: validates `site/config.mjs` against the runtime config
103
103
  reader.
104
- - `content:check`: validates section structure, image references, inline
105
- styles, and common content mistakes.
104
+ - `content:check`: validates section structure, managed media references,
105
+ inline styles, and common content mistakes.
106
106
  - `content:sync` / `norna:sync`: moves misplaced referenced image files after
107
- confirmation.
107
+ confirmation when the intended move is unambiguous. Moving files between the
108
+ homepage and routes, or between routes, requires a clean Git working tree.
108
109
  - `typography presets`: prints the exact built-in values for typography
109
110
  presets and rhythms.
110
111
  - `typography show`: prints the selected site's resolved typography for the
@@ -141,7 +141,7 @@ Fields:
141
141
  `Sections`.
142
142
  - `locale.labels.menu`: mobile menu summary text, default `Menu`.
143
143
  - `locale.labels.closeMenu`: reserved close-menu label, default `Close menu`.
144
- - `locale.labels.gallery`: Norna image block ARIA label prefix, default
144
+ - `locale.labels.gallery`: Norna managed media ARIA label prefix, default
145
145
  `Images`.
146
146
 
147
147
  Example:
package/docs/content.md CHANGED
@@ -91,10 +91,12 @@ page file:
91
91
  Do not list sections in frontmatter just to define order. Section order comes
92
92
  from the Markdown heading order.
93
93
 
94
- ## Image Blocks
94
+ ## Managed Media Blocks
95
95
 
96
- Norna-managed local images are written in Markdown fenced blocks at the point
97
- where they should appear in the section.
96
+ Norna-managed local images and cards are written in Markdown fenced blocks at
97
+ the point where they should appear in the section. Markdown determines
98
+ placement: move the fenced block in the page file to move the rendered image,
99
+ carousel, or card list.
98
100
 
99
101
  Use `norna-image-stack` for one or more stacked images:
100
102
 
@@ -119,6 +121,38 @@ Use `norna-image-carousel` for a carousel:
119
121
  ```
120
122
  ````
121
123
 
124
+ Use `norna-card-list` for a list of compact cards. Cards can include text,
125
+ managed images, links, and optional badge text:
126
+
127
+ ````md
128
+ ```norna-card-list
129
+ layout: image-top
130
+ flow: grid
131
+ size: m
132
+ width: normal
133
+
134
+ - title: Adopt
135
+ text: Give a dog a new home.
136
+ image: adopt.svg
137
+ link: /adopt/
138
+ badge-text: Recommended
139
+ - title: Foster
140
+ text: Help for a shorter period.
141
+ image: foster.svg
142
+ ```
143
+ ````
144
+
145
+ Card-list options:
146
+
147
+ - `layout`: `image-top`, `image-left`, or `image-right`.
148
+ - `flow`: `grid` or `stack`.
149
+ - `size`: `s`, `m`, `l`, or `xl`.
150
+ - `width`: `text`, `narrow`, `normal`, or `wide`.
151
+
152
+ Each card starts with `- title: Card title`. Card fields use two spaces of
153
+ indentation. Supported fields are `text`, `image`, `link`, and `badge-text`.
154
+ Each card must include at least one of `text`, `image`, or `link`.
155
+
122
156
  Each image entry supports:
123
157
 
124
158
  - `image`: required filename matching
@@ -127,8 +161,8 @@ Each image entry supports:
127
161
  - `alt`: optional alt text. If omitted, Norna renders an empty alt attribute.
128
162
  - `caption`: optional caption.
129
163
 
130
- Start every image entry with `- image: filename.jpg`. Optional fields use two
131
- spaces of indentation:
164
+ Start every image entry in image stacks and carousels with
165
+ `- image: filename.jpg`. Optional fields use two spaces of indentation:
132
166
 
133
167
  ````md
134
168
  ```norna-image-stack
@@ -174,7 +208,7 @@ Route images live under:
174
208
  site/routes/<NNN-route-id>/images/<section-id>/
175
209
  ```
176
210
 
177
- Image references in Norna image blocks use only the filename:
211
+ Image references in Norna managed media blocks use only the filename:
178
212
 
179
213
  ````md
180
214
  ```norna-image-stack
@@ -187,7 +221,8 @@ location is `site/images/team/portrait.jpg`.
187
221
 
188
222
  Filenames do not have to be globally unique for the site to be valid. Automatic
189
223
  sync only moves files when the filename identifies exactly one source candidate
190
- within the current page or route.
224
+ across the site's page and route image roots. If more than one candidate
225
+ exists, Norna reports the ambiguity instead of guessing.
191
226
 
192
227
  ## Markdown Images
193
228
 
@@ -199,8 +234,9 @@ Markdown image syntax is allowed for external images and public static assets:
199
234
  ```
200
235
 
201
236
  Relative local Markdown images such as `![Portrait](portrait.jpg)` are not
202
- managed by Norna. Use `norna-image-stack` or `norna-image-carousel` for local
203
- site images that should be validated, processed and synced.
237
+ managed by Norna. Use `norna-image-stack`, `norna-image-carousel`, or
238
+ `norna-card-list` for local site images that should be validated, processed and
239
+ synced.
204
240
 
205
241
  ## Temporary Sections
206
242
 
@@ -253,9 +289,9 @@ npm run norna:content:check
253
289
 
254
290
  This checks section heading ids, section metadata, duplicate image names,
255
291
  missing image files, misplaced referenced images, duplicate image references,
256
- invalid image blocks, unreferenced images, undefined inline styles, Markdown
257
- image references to unmanaged local files, and common frontmatter indentation
258
- and structure mistakes.
292
+ invalid managed media blocks, unreferenced images, undefined inline styles,
293
+ Markdown image references to unmanaged local files, and common frontmatter
294
+ indentation and structure mistakes.
259
295
 
260
296
  Frontmatter uses YAML indentation. Use ordinary spaces, not tabs or
261
297
  non-breaking spaces. `content:check` reports a focused error when indentation is
@@ -282,5 +318,19 @@ npm run norna:sync
282
318
  ```
283
319
 
284
320
  This moves referenced image files into the section directory shown by the
285
- Markdown placement. It prompts before writing unless `--yes` is passed. Sync is
286
- currently page- or route-local: it does not move images across routes.
321
+ Markdown placement. It prompts before writing unless `--yes` is passed.
322
+
323
+ `content:sync` is intentionally conservative. It only moves a file when the
324
+ filename identifies exactly one matching source candidate across the site's
325
+ page and route image roots, and when the move will not break another reference.
326
+ If the intended move is ambiguous, rename or move the file manually and run
327
+ `content:check` again.
328
+
329
+ Duplicate filenames are allowed when files already live where their Markdown
330
+ references expect them. Automatic relocation only requires site-wide filename
331
+ uniqueness for the file being moved.
332
+
333
+ When `content:sync` needs to move an image between the homepage and a route, or
334
+ between two routes, the Git working tree must be clean before the write. This
335
+ keeps cross-route sync easy to roll back. `content:check` only reports issues
336
+ and does not require a clean working tree.
@@ -0,0 +1,156 @@
1
+ # Norna Diagram Design
2
+
3
+ This document defines a repository-local workflow for creating technical and
4
+ pedagogical diagrams for Norna.
5
+
6
+ It is intentionally not a vendored copy of any external skill, MCP server, or
7
+ diagram tool. The first experiment should use hand-authored SVG assets managed
8
+ by Norna's existing image model.
9
+
10
+ ## Goal
11
+
12
+ Norna diagrams should help a new reader understand the site model faster than
13
+ text alone.
14
+
15
+ A diagram should explain one idea clearly, not show every related feature. If a
16
+ topic needs several ideas, split it into several diagrams.
17
+
18
+ ## Current Scope
19
+
20
+ Use this workflow for diagrams in the Norna documentation site under `site/`.
21
+
22
+ Do not add diagram generation to the Norna build pipeline yet. Diagram creation
23
+ is an authoring workflow for now, not product functionality.
24
+
25
+ Do not require Excalidraw, MCP servers, browser plugins, or external layout
26
+ tools for the first experiment.
27
+
28
+ ## Diagram Brief
29
+
30
+ Before creating or replacing a diagram, write a short brief:
31
+
32
+ ```md
33
+ Purpose:
34
+ Audience:
35
+ Main message:
36
+ Concepts to show:
37
+ Concepts to avoid:
38
+ Norna features that must not be implied:
39
+ Suggested layout:
40
+ Mobile/readability requirement:
41
+ Where the SVG will live:
42
+ Markdown block and alt text:
43
+ ```
44
+
45
+ The brief can live in the discussion, in a source-only Markdown comment near
46
+ the image, or in `docs/design/` when it is useful for future maintenance.
47
+
48
+ ## Design Principles
49
+
50
+ - Show one primary flow or relationship.
51
+ - Prefer two to five main objects.
52
+ - Use short labels.
53
+ - Use one clear visual hierarchy.
54
+ - Keep arrows few and directional.
55
+ - Avoid diagrams where every object connects to every other object.
56
+ - Prefer multiple simple diagrams over one dense diagram.
57
+ - Make route order, URL slugs, section ids, image folders, source files, and
58
+ generated output visually distinct when those ideas matter.
59
+ - Do not show templates, components, custom rendering logic, route-level
60
+ technical configuration, or hosting integrations that Norna does not support.
61
+ - Do not show page layouts that Norna cannot actually render unless the diagram
62
+ is clearly abstract and not a product capability example.
63
+
64
+ ## Norna-Specific Accuracy
65
+
66
+ Diagrams must match the current Norna model:
67
+
68
+ - A Norna site is described with site files, not arbitrary project structure.
69
+ - `content.md` is the homepage content file.
70
+ - Additional pages are route directories with `route-content.md`.
71
+ - Route folder prefixes control route presentation order.
72
+ - Route ids become default URL slugs.
73
+ - Images belong under the image root for the page or route, usually grouped by
74
+ section id.
75
+ - Markdown remains the primary writing format.
76
+ - Norna managed media blocks cover fixed site patterns such as image stacks,
77
+ carousels, and card lists.
78
+ - `theme.md` controls visual presentation.
79
+ - `config.mjs` controls technical site configuration.
80
+ - `dist/` is generated static output.
81
+ - GitHub Pages is the integrated publishing target today.
82
+
83
+ ## SVG Requirements
84
+
85
+ Use hand-authored SVG for the first experiment.
86
+
87
+ SVG assets should:
88
+
89
+ - have a `viewBox`;
90
+ - include `<title>` and `<desc>`;
91
+ - use real text, not outlined text;
92
+ - avoid external fonts and external image files;
93
+ - remain readable at the size used on the site;
94
+ - work when scaled down on a phone;
95
+ - use restrained colors that fit the surrounding page;
96
+ - avoid decorative effects that compete with the explanation;
97
+ - keep text inside boxes with visible margins;
98
+ - be maintainable by editing the SVG source.
99
+
100
+ If a diagram is too wide for mobile, prefer splitting it into smaller diagrams
101
+ over relying on horizontal scrolling.
102
+
103
+ ## Source Placement
104
+
105
+ Store diagram SVG files as normal Norna managed image assets:
106
+
107
+ ```text
108
+ site/routes/<NNN-route-id>/images/<section-id>/<diagram-name>.svg
109
+ ```
110
+
111
+ Reference them with a Norna managed media block:
112
+
113
+ ````md
114
+ <!-- norna-image-provenance:
115
+ image: diagram-name.svg
116
+ source: hand-authored
117
+ Short maintenance note explaining why the diagram exists.
118
+ -->
119
+
120
+ ```norna-image-stack
121
+ - image: diagram-name.svg
122
+ alt: Concise explanation of what the diagram shows.
123
+ ```
124
+ ````
125
+
126
+ ## Review Checklist
127
+
128
+ Before accepting a diagram:
129
+
130
+ - The main message is obvious without reading the surrounding section.
131
+ - The diagram does not imply unsupported Norna functionality.
132
+ - URL, route, section, image, theme, config, and output terminology is
133
+ consistent with documentation.
134
+ - Text fits inside boxes at desktop and mobile widths.
135
+ - Arrows clarify the relationship instead of adding noise.
136
+ - The SVG has title, description, and useful alt text in Markdown.
137
+ - `norna content:check` passes.
138
+ - A desktop and mobile visual check has been done when layout changed.
139
+
140
+ ## Relationship To Excalidraw
141
+
142
+ Excalidraw can be useful as a sketching style or inspiration for box-and-arrow
143
+ clarity, but the first Norna experiment should not depend on Excalidraw files,
144
+ exports, or MCP tooling.
145
+
146
+ If future experiments show that diagram generation should be automated, evaluate
147
+ that as a separate authoring tool or CLI. Do not make it part of the site build
148
+ engine unless there is a clear product reason.
149
+
150
+ ## Future Questions
151
+
152
+ - Should diagram briefs become tracked files next to SVG assets?
153
+ - Should Norna have a separate authoring helper for diagrams?
154
+ - Should generated diagrams store both a source format and exported SVG?
155
+ - Should a later tool create Excalidraw-compatible files, plain SVG, or both?
156
+ - What review rules are needed before diagrams are used in starters or examples?
@@ -16,10 +16,13 @@ Install Playwright Chromium only when you plan to run navigation diagnostics:
16
16
  npx playwright install chromium
17
17
  ```
18
18
 
19
- ## Create A Site Repository
19
+ ## Create A Site
20
20
 
21
- Create the site from the starter first, then install dependencies inside the
22
- new site directory:
21
+ ### Standalone Site
22
+
23
+ Use a standalone setup when the website is its own project. Create the site
24
+ from the starter first, then install dependencies inside the new site
25
+ directory:
23
26
 
24
27
  ```sh
25
28
  cd path/to/your/projects
@@ -55,11 +58,33 @@ The starter contains:
55
58
  - `site/config.mjs`
56
59
  - `site/theme.md`
57
60
  - `site/content.md`
58
- - `site/images/work/.gitkeep`
59
61
  - `site/public/robots.txt`
60
62
 
61
63
  Commit the generated `package-lock.json` after the first install.
62
64
 
65
+ ### Embedded Site
66
+
67
+ Use an embedded setup when a Norna site should live inside an existing Node or
68
+ GitHub project:
69
+
70
+ ```sh
71
+ cd existing-project
72
+ npx @janga/norna@latest init . --type embedded --site-dir presentation
73
+ npm install
74
+ npm run norna:dev
75
+ ```
76
+
77
+ The command looks different because the target is different. `.` means "add
78
+ Norna to the current project" instead of creating a new directory.
79
+ `--site-dir presentation` tells Norna to manage `presentation/` as the site
80
+ directory instead of the default `site/`.
81
+
82
+ Embedded setup keeps the surrounding project structure. It adds namespaced
83
+ `norna:*` scripts so Norna does not take over the project's normal `build`,
84
+ `test`, or deploy scripts.
85
+
86
+ Relevant documentation: [Commands](commands.md), [Site Structure](site-structure.md).
87
+
63
88
  ## First Edits
64
89
 
65
90
  1. Edit `site/config.mjs` for the site's URL, language labels, GitHub
@@ -68,9 +93,10 @@ Commit the generated `package-lock.json` after the first install.
68
93
  rhythm, image sizing, font, typography preset, colors, inline styles, and
69
94
  frame colors, or omit it to use engine defaults.
70
95
  3. Edit `site/content.md` for homepage title, description, Markdown sections,
71
- text, Norna image blocks, page/section presentation overrides, alt text, and
72
- captions.
73
- 4. Put source images under `site/images/<section-id>/`.
96
+ text, Norna managed media blocks, page/section presentation overrides, alt
97
+ text, and captions.
98
+ 4. Put source images under `site/images/<section-id>/`, where `<section-id>`
99
+ matches a `## Section {#section-id}` heading in `site/content.md`.
74
100
  5. Add optional route pages under
75
101
  `site/routes/<NNN-route-id>/route-content.md`, for example
76
102
  `site/routes/010-about/route-content.md`.
@@ -79,10 +105,23 @@ Commit the generated `package-lock.json` after the first install.
79
105
  7. Run:
80
106
 
81
107
  ```sh
108
+ npm run norna:config:check
109
+ npm run norna:content:check
110
+ npm run norna:sync
82
111
  npm run norna:check
83
112
  npm run build
84
113
  ```
85
114
 
115
+ `norna:sync` moves misplaced referenced image files when the intended move is
116
+ unambiguous. It can move images between sections and routes, but cross-route
117
+ writes require a clean Git working tree so the operation is easy to roll back.
118
+ Publishing is normally done by committing the site files and pushing them with
119
+ Git; the starter GitHub Pages workflow runs the required checks before
120
+ publishing.
121
+
122
+ Relevant documentation: [Content](content.md), [Theme](theme.md),
123
+ [Typography](typography.md), [Routes](routes.md), [Images And Metadata](images-and-metadata.md).
124
+
86
125
  ## Configure The Public URL
87
126
 
88
127
  For a custom domain or any site published at the web root, use:
@@ -112,6 +151,8 @@ The starter includes a GitHub Pages workflow in `.github/workflows/deploy.yml`.
112
151
  In the GitHub repository settings, configure Pages to build from GitHub
113
152
  Actions.
114
153
 
154
+ Relevant documentation: [Configuration](configuration.md), [Publishing](publishing.md).
155
+
115
156
  Read [Site Structure](site-structure.md), [Content](content.md),
116
157
  [Theme](theme.md), [Typography](typography.md), [Routes](routes.md), and
117
158
  [Configuration](configuration.md) before publishing a real site.
@@ -6,8 +6,8 @@ source images and any copyright or licensing policy for those images.
6
6
  ## Managed Source Images
7
7
 
8
8
  Norna-managed local images are referenced from Markdown with
9
- `norna-image-stack` or `norna-image-carousel` blocks. See
10
- [Content](content.md#image-blocks) for the block syntax.
9
+ `norna-image-stack`, `norna-image-carousel`, or `norna-card-list` blocks. See
10
+ [Content](content.md#managed-media-blocks) for the block syntax.
11
11
 
12
12
  Homepage source images live under:
13
13
 
@@ -28,7 +28,7 @@ Supported source extensions:
28
28
  - `.png`
29
29
  - `.svg`
30
30
 
31
- Image block references use only the filename:
31
+ Managed media block references use only the filename:
32
32
 
33
33
  ````md
34
34
  ```norna-image-stack
@@ -53,8 +53,10 @@ prompt: Short prompt or editing note.
53
53
  ```
54
54
 
55
55
  Filenames do not have to be globally unique for the site to be valid.
56
- Automatic sync only moves files when the filename identifies exactly one source
57
- candidate within the current page or route.
56
+ Automatic sync only moves misplaced files when the filename identifies exactly
57
+ one source candidate across the site's page and route image roots, and when the
58
+ move will not break another reference. If the move crosses page or route image
59
+ roots, `content:sync` requires a clean Git working tree before writing.
58
60
 
59
61
  ## Markdown Images
60
62
 
@@ -98,7 +100,7 @@ example-work-1a2b3c4d-1440.webp
98
100
  When a source image changes, the generated URL changes too. This avoids stale
99
101
  browser, CDN, and GitHub Actions cache entries at the old URL.
100
102
 
101
- SVG files are managed by the same Markdown image blocks, validation and sync
103
+ SVG files are managed by the same Markdown media blocks, validation and sync
102
104
  model, but they are not rasterized and do not get WebP variants. Norna copies
103
105
  the SVG source to:
104
106
 
@@ -164,6 +166,9 @@ static website, restrained colors, readable composition, no text in the image.
164
166
  ```
165
167
  ````
166
168
 
169
+ The same provenance comment style can be used next to a `norna-image-carousel`
170
+ or `norna-card-list` block when generated images are referenced there.
171
+
167
172
  This is a maintenance rule for real editorial images. It is not necessary for
168
173
  throwaway test fixtures or examples where the prompt has no practical value.
169
174
 
package/docs/routes.md CHANGED
@@ -4,9 +4,14 @@
4
4
  under `site/routes/<NNN-route-id>/route-content.md` and build to first-level
5
5
  URLs.
6
6
 
7
- Routes use the same page frontmatter, optional section metadata, Norna image
8
- blocks, and Markdown section model as the homepage. See [Content](content.md)
9
- for the page and section model.
7
+ Routes use the same page frontmatter, optional section metadata, Norna managed
8
+ media blocks, and Markdown section model as the homepage. See
9
+ [Content](content.md) for the page and section model.
10
+
11
+ Route directories can contain route content, route-local images, and
12
+ route-local presentation overrides in `route-content.md`. They cannot contain
13
+ technical site configuration; technical configuration stays at the selected
14
+ site directory's top-level `config.mjs`.
10
15
 
11
16
  ## Route Directory Format
12
17
 
@@ -107,3 +112,9 @@ Image references in route content still use only the filename:
107
112
  ````
108
113
 
109
114
  The image directory segment after `images/` should match the section id.
115
+ If the section id or route folder changes, run `norna content:check` to find
116
+ misplaced images and `norna content:sync` to move unambiguous files into the
117
+ expected section folder. `content:sync` can move images between route image
118
+ roots when the filename is unambiguous across the site and the move will not
119
+ break another reference; these cross-route writes require a clean Git working
120
+ tree.
@@ -42,7 +42,8 @@ Version these files in a site repository:
42
42
  colors.
43
43
  See [Theme](theme.md).
44
44
  - `site/content.md`: homepage page file with editable content, Markdown
45
- sections, optional section metadata, image blocks, alt text, and captions.
45
+ sections, optional section metadata, managed media blocks, alt text, and
46
+ captions.
46
47
  See [Content](content.md).
47
48
  - `site/images/<section-id>/`: original source images.
48
49
  - `site/routes/<NNN-route-id>/route-content.md`: optional route page files.
@@ -82,8 +83,10 @@ In this repository:
82
83
  - `bin/norna-cli.mjs` dispatches public CLI commands.
83
84
  - `scripts/` contains validation, image, local preview, deploy, and test tools.
84
85
  - `src/` contains the Astro renderer, components, styles, and content schema.
85
- - `starters/basic/` is copied by `norna init <target-dir>` to create a
86
- site repository.
86
+ - `starters/basic/` is the default compact starter copied by
87
+ `norna init <target-dir>`.
88
+ - `starters/project/` is a project-site starter used as a maintained example
89
+ for small project and developer-tool sites.
87
90
  - `fixtures/basic/site/` is used by engine regression tests.
88
91
  - `examples/dog-gallery/site/` is the local visual dog example used by demo
89
92
  builds and navigation diagnostics.
package/docs/theme.md CHANGED
@@ -6,7 +6,8 @@ missing, built-in engine defaults are used.
6
6
 
7
7
  Page-level presentation in `site/content.md` and route page files is always an
8
8
  override on top of `site/theme.md`. Section-level presentation is an override
9
- on top of the resolved page presentation.
9
+ on top of the resolved page presentation. Use those overrides for focused
10
+ exceptions; the normal place for shared visual choices is `site/theme.md`.
10
11
 
11
12
  ## Minimal Theme
12
13
 
@@ -74,7 +75,7 @@ navigation:
74
75
  - `density`: default structural spacing profile. Allowed values are `compact`,
75
76
  `normal`, and `airy`.
76
77
  - `spacing`: optional structural spacing overrides for sections and Norna
77
- image blocks. Every spacing value accepts either one CSS length for all
78
+ managed media blocks. Every spacing value accepts either one CSS length for all
78
79
  viewports or `desktop` / `mobile` values.
79
80
 
80
81
  Example:
@@ -104,7 +105,7 @@ Spacing keys:
104
105
  - `firstSectionTop`: space above the first section heading.
105
106
  - `sectionGap`: space above each following section.
106
107
  - `finalSectionBottom`: space below the final section.
107
- - `bodyToImages`: space from section body text to Norna image blocks.
108
+ - `bodyToImages`: space from section body text to Norna managed media blocks.
108
109
  - `imageGap`: space between stacked images or carousel blocks.
109
110
 
110
111
  Text-near spacing, such as spacing after headings, spacing before Markdown
@@ -207,7 +208,9 @@ presentation:
207
208
  ```
208
209
 
209
210
  Section-specific presentation belongs under
210
- `sections.<section-id>.presentation`:
211
+ `sections.<section-id>.presentation`. Use it when one section genuinely needs
212
+ different presentation; do not use `sections` to define section order or normal
213
+ Markdown structure.
211
214
 
212
215
  ```yaml
213
216
  sections:
@@ -5,8 +5,8 @@ presets, text rhythm, and optional overrides.
5
5
 
6
6
  The normal place to choose a site-wide typography preset and rhythm is the
7
7
  top-level `typography` block in `site/theme.md`.
8
- Page and section files may override the theme when a page or section needs a
9
- different presentation.
8
+ Page and section files may override the theme when a focused exception is
9
+ needed, but the normal workflow is to keep typography in `theme.md`.
10
10
 
11
11
  ## Presets
12
12
 
@@ -18,9 +18,8 @@ Available presets:
18
18
  short information blocks.
19
19
  - `text-forward`: more generous body text for pages where longer text carries
20
20
  more of the experience.
21
- - `statement`: tighter, more declarative line-height for introductions, first
22
- sections, and short programmatic statements. Use it sparingly, usually as a
23
- section override.
21
+ - `statement`: tighter, more declarative line-height for short programmatic
22
+ statements. Use it sparingly, usually as a page or section exception.
24
23
 
25
24
  If theme typography is omitted, `quiet-gallery` is used.
26
25