@janga/norna 0.7.13 → 0.7.15

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 (146) hide show
  1. package/README.md +15 -9
  2. package/bin/norna-cli.mjs +11 -4
  3. package/docs/README.md +71 -43
  4. package/docs/commands.md +34 -20
  5. package/docs/configuration.md +43 -62
  6. package/docs/content.md +34 -7
  7. package/docs/design/command-organization.md +15 -8
  8. package/docs/design/norna-diagram-design.md +6 -6
  9. package/docs/design/site-examples-structure.md +1 -1
  10. package/docs/engine-development.md +22 -9
  11. package/docs/getting-started.md +29 -16
  12. package/docs/how-to/embedded-site.md +1 -1
  13. package/docs/images-and-metadata.md +3 -3
  14. package/docs/local-development.md +11 -3
  15. package/docs/public-files.md +105 -0
  16. package/docs/publishing.md +4 -8
  17. package/docs/routes.md +6 -7
  18. package/docs/site-files.md +144 -0
  19. package/docs/sitewide-content.md +47 -33
  20. package/docs/theme.md +37 -49
  21. package/docs/typography.md +25 -31
  22. package/examples/complete-sites/dog-shelter-multi-page/README.md +8 -0
  23. package/examples/complete-sites/{dog-shelter-single-page/site/config.md → dog-shelter-multi-page/site/config.yaml} +0 -2
  24. package/examples/complete-sites/dog-shelter-multi-page/site/sitewide-content.yaml +6 -0
  25. package/examples/complete-sites/dog-shelter-multi-page/site/{theme.md → theme.yaml} +0 -2
  26. package/examples/complete-sites/dog-shelter-single-page/README.md +8 -0
  27. package/examples/complete-sites/{dog-shelter-multi-page/site/config.md → dog-shelter-single-page/site/config.yaml} +0 -2
  28. package/examples/complete-sites/dog-shelter-single-page/site/sitewide-content.yaml +6 -0
  29. package/examples/complete-sites/dog-shelter-single-page/site/{theme.md → theme.yaml} +0 -2
  30. package/examples/feature-demos/media-and-surfaces/.astro/data-store.json +1 -1
  31. package/examples/feature-demos/media-and-surfaces/README.md +1 -1
  32. package/examples/feature-demos/media-and-surfaces/site/{config.md → config.yaml} +0 -2
  33. package/examples/feature-demos/media-and-surfaces/site/content.md +2 -2
  34. package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/{route-content.md → content.md} +3 -7
  35. package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/theme.yaml +3 -0
  36. package/examples/feature-demos/media-and-surfaces/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
  37. package/examples/feature-demos/media-and-surfaces/site/{theme.md → theme.yaml} +0 -2
  38. package/examples/feature-demos/sitewide-content/README.md +8 -0
  39. package/examples/feature-demos/sitewide-content/site/{config.md → config.yaml} +0 -2
  40. package/examples/feature-demos/sitewide-content/site/routes/010-identity/{route-content.md → content.md} +3 -3
  41. package/examples/feature-demos/sitewide-content/site/routes/020-notices/{route-content.md → content.md} +1 -1
  42. package/examples/feature-demos/sitewide-content/site/routes/030-footer/{route-content.md → content.md} +1 -1
  43. package/examples/feature-demos/sitewide-content/site/{sitewide-content.md → sitewide-content.yaml} +1 -11
  44. package/examples/feature-demos/sitewide-content/site/{theme.md → theme.yaml} +0 -2
  45. package/examples/feature-demos/theme-presets/site/config.yaml +1 -0
  46. package/examples/feature-demos/theme-presets/site/routes/010-portfolio/{theme.md → theme.yaml} +0 -2
  47. package/examples/feature-demos/theme-presets/site/routes/020-documentation/{theme.md → theme.yaml} +0 -2
  48. package/examples/feature-demos/theme-presets/site/routes/030-project/theme.yaml +1 -0
  49. package/examples/feature-demos/theme-presets/site/routes/040-statement/{route-content.md → content.md} +1 -1
  50. package/examples/feature-demos/theme-presets/site/routes/040-statement/{theme.md → theme.yaml} +0 -2
  51. package/examples/feature-demos/theme-presets/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
  52. package/examples/feature-demos/theme-presets/site/theme.yaml +1 -0
  53. package/fixtures/basic/site/{config.md → config.yaml} +0 -2
  54. package/fixtures/basic/site/content.md +3 -3
  55. package/fixtures/basic/site/{sitewide-content.md → sitewide-content.yaml} +0 -2
  56. package/fixtures/basic/site/{theme.md → theme.yaml} +3 -6
  57. package/fixtures/content-model-v2/site/{config.md → config.yaml} +0 -2
  58. package/fixtures/content-model-v2/site/theme.yaml +4 -0
  59. package/package.json +10 -3
  60. package/schemas/config.schema.json +77 -0
  61. package/schemas/content-frontmatter.schema.json +81 -0
  62. package/schemas/manifest.json +9 -0
  63. package/schemas/sitewide-content.schema.json +215 -0
  64. package/schemas/theme.schema.json +1208 -0
  65. package/scripts/check-config.mjs +18 -11
  66. package/scripts/export-theme-preset.mjs +1 -1
  67. package/scripts/generate-schemas.mjs +283 -0
  68. package/scripts/init-site.mjs +22 -27
  69. package/scripts/lib/documentation-links.mjs +8 -0
  70. package/scripts/lib/editor-language-service.mjs +609 -0
  71. package/scripts/lib/example-sites.mjs +2 -2
  72. package/scripts/lib/git-status.mjs +7 -0
  73. package/scripts/lib/logo-assets.mjs +15 -10
  74. package/scripts/lib/norna-markdown-blocks.mjs +90 -11
  75. package/scripts/lib/presentation.mjs +23 -12
  76. package/scripts/lib/project-config.mjs +17 -41
  77. package/scripts/lib/public-asset-conventions.mjs +112 -0
  78. package/scripts/lib/schema-definitions.mjs +213 -0
  79. package/scripts/lib/schema-value-definitions.mjs +86 -0
  80. package/scripts/lib/site-content.mjs +24 -18
  81. package/scripts/lib/site-paths.mjs +4 -8
  82. package/scripts/lib/sitewide-content.mjs +24 -0
  83. package/scripts/lib/theme-config.mjs +15 -35
  84. package/scripts/lib/theme-presets.mjs +76 -66
  85. package/scripts/lib/typography.mjs +15 -15
  86. package/scripts/lib/yaml-config.mjs +50 -0
  87. package/scripts/list-theme-presets.mjs +15 -0
  88. package/scripts/release.mjs +84 -8
  89. package/scripts/show-typography.mjs +22 -46
  90. package/scripts/sync-content-sections.mjs +2 -2
  91. package/scripts/test-client-javascript.mjs +28 -28
  92. package/scripts/test-content-check.mjs +21 -26
  93. package/scripts/test-content-model-v2.mjs +72 -40
  94. package/scripts/test-documentation.mjs +70 -4
  95. package/scripts/test-editor-language-service.mjs +158 -0
  96. package/scripts/test-engine-commands.mjs +65 -34
  97. package/scripts/test-package-check.mjs +37 -30
  98. package/scripts/test-project-config.mjs +15 -20
  99. package/scripts/test-schemas.mjs +102 -0
  100. package/scripts/test-temporary-visibility.mjs +5 -13
  101. package/scripts/test-theme-presets.mjs +64 -37
  102. package/src/components/CardList.astro +2 -5
  103. package/src/components/ImageCarousel.astro +21 -21
  104. package/src/components/{GalleryGrid.astro → ImageStack.astro} +12 -12
  105. package/src/components/SectionNavigationScript.astro +28 -0
  106. package/src/components/SiteNavigation.astro +6 -5
  107. package/src/components/SitePage.astro +8 -8
  108. package/src/components/SiteSection.astro +18 -21
  109. package/src/content.config.ts +17 -209
  110. package/src/layouts/BaseLayout.astro +9 -9
  111. package/src/lib/{galleryImages.ts → imagePresentation.ts} +7 -7
  112. package/src/lib/routeThemes.ts +9 -29
  113. package/src/lib/sectionContent.ts +3 -3
  114. package/src/lib/sitePublicAssets.ts +5 -21
  115. package/src/styles/global.css +73 -73
  116. package/starters/basic/.github/workflows/deploy.yml +1 -1
  117. package/starters/basic/README.md +16 -13
  118. package/starters/basic/package.json +3 -2
  119. package/starters/basic/site/{config.md → config.yaml} +0 -2
  120. package/starters/basic/site/content.md +1 -1
  121. package/starters/basic/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
  122. package/starters/basic/site/{theme.md → theme.yaml} +8 -15
  123. package/starters/project/.github/workflows/deploy.yml +1 -1
  124. package/starters/project/README.md +22 -15
  125. package/starters/project/package.json +3 -2
  126. package/starters/project/site/{config.md → config.yaml} +0 -2
  127. package/starters/project/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
  128. package/starters/project/site/{theme.md → theme.yaml} +4 -8
  129. package/docs/site-structure.md +0 -98
  130. package/examples/complete-sites/dog-shelter-multi-page/site/sitewide-content.md +0 -16
  131. package/examples/complete-sites/dog-shelter-single-page/site/sitewide-content.md +0 -16
  132. package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/theme.md +0 -8
  133. package/examples/feature-demos/theme-presets/site/config.md +0 -3
  134. package/examples/feature-demos/theme-presets/site/routes/030-project/theme.md +0 -3
  135. package/examples/feature-demos/theme-presets/site/theme.md +0 -3
  136. package/fixtures/content-model-v2/site/theme.md +0 -7
  137. package/scripts/lib/sitewide-config.mjs +0 -34
  138. package/src/components/MobileSectionNavigationScript.astro +0 -14
  139. /package/examples/complete-sites/dog-shelter-multi-page/site/routes/010-dogs/{route-content.md → content.md} +0 -0
  140. /package/examples/complete-sites/dog-shelter-multi-page/site/routes/020-adopt/{route-content.md → content.md} +0 -0
  141. /package/examples/feature-demos/media-and-surfaces/site/routes/010-media/{route-content.md → content.md} +0 -0
  142. /package/examples/feature-demos/theme-presets/site/routes/010-portfolio/{route-content.md → content.md} +0 -0
  143. /package/examples/feature-demos/theme-presets/site/routes/020-documentation/{route-content.md → content.md} +0 -0
  144. /package/examples/feature-demos/theme-presets/site/routes/030-project/{route-content.md → content.md} +0 -0
  145. /package/fixtures/content-model-v2/site/routes/010-guide/{route-content.md → content.md} +0 -0
  146. /package/starters/project/site/routes/010-guide/{route-content.md → content.md} +0 -0
package/README.md CHANGED
@@ -30,7 +30,7 @@ You need Node.js 22.12 or later.
30
30
  npx @janga/norna@latest init my-site
31
31
  cd my-site
32
32
  npm install
33
- npm run dev
33
+ npm run norna:dev
34
34
  ```
35
35
 
36
36
  Open the URL printed by the development server, then edit the files under
@@ -40,13 +40,18 @@ scripts and GitHub Pages workflow needed to check, build, and publish it.
40
40
  Follow the [five-minute tutorial](docs/getting-started.md) for a first edit and
41
41
  verified build.
42
42
 
43
+ For shorter commands, install the launcher globally with
44
+ `npm install --global @janga/norna@latest`. You can then use `norna dev`,
45
+ `norna check`, and `norna build`; inside a project, the launcher selects its
46
+ locally installed and pinned Norna version.
47
+
43
48
  ## The Site Model
44
49
 
45
50
  ```text
46
51
  site/
47
- |-- config.md
48
- |-- theme.md
49
- |-- sitewide-content.md
52
+ |-- config.yaml
53
+ |-- theme.yaml
54
+ |-- sitewide-content.yaml
50
55
  |-- content.md
51
56
  |-- images/
52
57
  |-- routes/
@@ -56,9 +61,9 @@ site/
56
61
  - `content.md` holds the homepage and its sections.
57
62
  - `images/` holds managed source images beside the content they belong to.
58
63
  - `routes/` adds pages, each with content and optional local images and theme.
59
- - `theme.md` normally selects one complete visual preset.
60
- - `sitewide-content.md` holds shared identity, banners, and footer content.
61
- - `config.md` holds the public URL and optional language and scroll behavior.
64
+ - `theme.yaml` normally selects one complete visual preset.
65
+ - `sitewide-content.yaml` holds shared identity, banners, and footer content.
66
+ - `config.yaml` holds the public URL and optional language and scroll behavior.
62
67
  - `public/` holds static files copied without processing.
63
68
 
64
69
  Norna validates this structure, processes managed images when needed, and
@@ -119,10 +124,11 @@ engine diagnostics, not for ordinary editing and local preview. See
119
124
  ## Documentation
120
125
 
121
126
  - [Five-minute tutorial](docs/getting-started.md)
127
+ - [Site files](docs/site-files.md)
122
128
  - [Task-oriented documentation map](docs/README.md)
123
- - [How-to guides](docs/README.md#how-to-guides)
129
+ - [Common workflows](docs/README.md#common-workflows)
124
130
  - [Concepts and explanation](docs/README.md#concepts-and-explanation)
125
- - [Technical reference](docs/README.md#reference)
131
+ - [Command and platform reference](docs/README.md#command-and-platform-reference)
126
132
  - [Troubleshooting](docs/README.md#troubleshooting)
127
133
  - [AI-readable documentation index](https://janga.github.io/norna/llms.txt)
128
134
 
package/bin/norna-cli.mjs CHANGED
@@ -14,11 +14,13 @@ Commands:
14
14
  dev:status Show local dev server status
15
15
  dev:logs Show local dev server logs
16
16
  dev:stop Stop local dev server
17
- config:check Validate site/config.md
17
+ check Validate configuration and content
18
+ config:check Validate site/config.yaml
18
19
  content:check Validate site/content.md and image references
19
20
  content:sync Move misplaced Norna-managed images and refresh generated images
21
+ theme:presets List available theme presets and their intended uses
20
22
  theme:export Export a commented theme preset reference
21
- typography presets Show built-in typography preset values
23
+ typography profiles Show built-in typography profile values
22
24
  typography show Show resolved typography for the selected site
23
25
  site:public Sync site/public/ to public/
24
26
  images Generate optimized image variants
@@ -125,6 +127,9 @@ try {
125
127
  await runScript('scripts/dev-local.mjs', ['logs', ...rest]);
126
128
  } else if (command === 'dev:stop') {
127
129
  await runScript('scripts/dev-local.mjs', ['stop', ...rest]);
130
+ } else if (command === 'check') {
131
+ await runScript('scripts/check-config.mjs', rest);
132
+ await runScript('scripts/sync-content-sections.mjs', ['--check', ...rest]);
128
133
  } else if (command === 'config:check') {
129
134
  await runScript('scripts/check-config.mjs', rest);
130
135
  } else if (command === 'content:check') {
@@ -132,11 +137,13 @@ try {
132
137
  } else if (command === 'content:sync') {
133
138
  await runScript('scripts/sync-content-sections.mjs', ['--write', ...rest]);
134
139
  await runScript('scripts/generate-images.mjs', rest);
140
+ } else if (command === 'theme:presets') {
141
+ await runScript('scripts/list-theme-presets.mjs', rest);
135
142
  } else if (command === 'theme:export') {
136
143
  await runScript('scripts/export-theme-preset.mjs', rest);
137
- } else if (command === 'typography:presets' || (command === 'typography' && subcommand === 'presets')) {
144
+ } else if (command === 'typography:profiles' || (command === 'typography' && subcommand === 'profiles')) {
138
145
  const scriptArgs = command === 'typography' ? subcommandRest : rest;
139
- await runScript('scripts/show-typography.mjs', ['presets', ...scriptArgs]);
146
+ await runScript('scripts/show-typography.mjs', ['profiles', ...scriptArgs]);
140
147
  } else if (command === 'typography:show' || (command === 'typography' && subcommand === 'show')) {
141
148
  const scriptArgs = command === 'typography' ? subcommandRest : rest;
142
149
  await runScript('scripts/show-typography.mjs', ['show', ...scriptArgs]);
package/docs/README.md CHANGED
@@ -1,23 +1,59 @@
1
1
  # Norna Documentation
2
2
 
3
- Use this page to choose documentation by what you are trying to accomplish.
4
- The [Norna introduction site](https://janga.github.io/norna/) explains the
5
- product; these Markdown files provide the tutorial, task guides, explanation,
6
- and exact reference.
3
+ The [Norna introduction site](https://janga.github.io/norna/) explains what the
4
+ tool is for. These Markdown files are the authoritative tutorial, workflow
5
+ guides, and reference.
7
6
 
8
7
  ## Start Here
9
8
 
10
9
  1. [Build your first Norna site](getting-started.md) follows one short path from
11
10
  an empty directory to a checked build.
12
- 2. [Requirements and limitations](requirements.md) states what must be
13
- installed and what Norna does and does not support today.
14
- 3. [Examples](../examples/README.md) pairs complete and focused source projects
15
- with their rendered sites.
11
+ 2. [Site Files](site-files.md) is the canonical map of every source file,
12
+ convention-based directory, and generated location.
13
+ 3. [Requirements and limitations](requirements.md) lists required software and
14
+ current product boundaries.
15
+ 4. [Examples](../examples/README.md) pairs complete and focused source projects
16
+ with rendered sites.
16
17
 
17
18
  Do not read the reference from beginning to end before trying Norna. Complete
18
- the tutorial, then use the task links below when a real site needs them.
19
-
20
- ## How-To Guides
19
+ the tutorial, then open the reference for the file or workflow you are changing.
20
+
21
+ ## Site File Reference
22
+
23
+ Norna expects this top-level source model:
24
+
25
+ ```text
26
+ site/
27
+ |-- config.yaml
28
+ |-- theme.yaml
29
+ |-- sitewide-content.yaml
30
+ |-- content.md
31
+ |-- images/
32
+ |-- routes/
33
+ `-- public/
34
+ ```
35
+
36
+ - [`config.yaml`](configuration.md): public URL, language, and native browser
37
+ scroll behavior.
38
+ - [`theme.yaml`](theme.md): complete visual presets and focused presentation
39
+ overrides.
40
+ - [`sitewide-content.yaml`](sitewide-content.md): shared navigation identity,
41
+ banners, and footer.
42
+ - [`content.md`](content.md): page metadata, sections, prose, notes, and Norna
43
+ blocks.
44
+ - [`images/`](images-and-metadata.md): managed source formats, variants, sync,
45
+ and generated image state.
46
+ - [`routes/`](routes.md): additional pages, ordering, URLs, route themes, and
47
+ route-local images.
48
+ - [`public/`](public-files.md): navigation logos, favicons, and other static
49
+ files copied without managed-image processing.
50
+ - [Generated files](site-files.md#generated-files): `site/.norna/public/`,
51
+ `dist/`, and `.astro/`.
52
+
53
+ The [complete Site Files reference](site-files.md) explains which paths are
54
+ required, optional, convention-discovered, versioned, or generated.
55
+
56
+ ## Common Workflows
21
57
 
22
58
  ### Create And Run A Site
23
59
 
@@ -26,22 +62,23 @@ the tutorial, then use the task links below when a real site needs them.
26
62
  - [Start and manage local preview](local-development.md)
27
63
  - [Inspect or update the installed engine](commands.md#command-summary)
28
64
 
29
- ### Write And Organise Content
65
+ ### Write Content
30
66
 
31
67
  - [Write page sections](content.md#sections)
32
- - [Use image stacks, carousels, and cards](content.md#managed-media-blocks)
68
+ - [Use image stacks, carousels, and cards](content.md#norna-blocks)
33
69
  - [Add notes to prose](content.md#markdown-text)
34
70
  - [Add another page](routes.md)
35
- - [Add shared identity, banners, and a footer](sitewide-content.md)
71
+ - [Add shared banners or footer content](sitewide-content.md)
36
72
 
37
- ### Work With Images
73
+ ### Work With Images And Public Assets
38
74
 
39
75
  - [Add managed source images](images-and-metadata.md#managed-source-images)
40
- - [Place image blocks in Markdown](content.md#managed-media-blocks)
41
76
  - [Check and sync moved image references](content.md#validation-and-sync)
42
- - [Understand generated variants and SVG handling](images-and-metadata.md#generated-variants-and-static-svg)
77
+ - [Add a navigation logo](public-files.md#navigation-logo)
78
+ - [Add favicons](public-files.md#logos-and-favicons)
79
+ - [Add other static files](public-files.md#other-static-files)
43
80
 
44
- ### Change The Presentation
81
+ ### Change Presentation
45
82
 
46
83
  - [Choose a complete theme preset](theme.md#theme-presets)
47
84
  - [Inspect and override a preset](theme.md#overrides)
@@ -50,37 +87,28 @@ the tutorial, then use the task links below when a real site needs them.
50
87
 
51
88
  ### Check, Build, And Publish
52
89
 
53
- - [Run content and configuration checks](commands.md#starter-npm-scripts)
54
- - [Build and inspect generated output](site-structure.md#generated-files)
55
- - [Publish through the included GitHub Pages workflow](publishing.md#github-pages-workflow)
56
- - [Monitor or troubleshoot a deployment](publishing.md)
90
+ - [Run configuration and content checks](commands.md#starter-npm-scripts)
91
+ - [Build and inspect generated output](site-files.md#generated-files)
92
+ - [Publish through GitHub Pages](publishing.md#github-pages-workflow)
93
+ - [Monitor or troubleshoot deployment](publishing.md)
57
94
 
58
95
  ## Concepts And Explanation
59
96
 
60
97
  - [Norna's site model](https://janga.github.io/norna/concepts/) explains how
61
98
  files, sections, images, and routes become a website.
62
- - [Site Structure](site-structure.md) separates source files, generated files,
63
- examples, fixtures, and engine code.
64
- - [Images and Metadata](images-and-metadata.md) explains why Norna manages image
65
- variants and published URLs.
66
- - [Command Organization](design/command-organization.md) explains the command
67
- model for standalone sites, embedded sites, and engine development.
68
- - [Site Examples Structure](design/site-examples-structure.md) explains the
69
- difference between starters, examples, documentation sites, and fixtures.
70
-
71
- ## Reference
72
-
73
- - [Configuration](configuration.md): `site/config.md` fields and defaults.
74
- - [Sitewide Content](sitewide-content.md): shared identity, banners, and footer.
75
- - [Content](content.md): page frontmatter, sections, blocks, notes, and checks.
76
- - [Theme](theme.md): presets, overrides, layout, image sizing, and surfaces.
77
- - [Typography](typography.md): typography roles, rhythms, and inspection.
78
- - [Routes](routes.md): directory names, route IDs, URLs, and route images.
79
- - [Images and Metadata](images-and-metadata.md): source formats, variants, and
80
- generated manifests.
81
- - [Commands](commands.md): CLI commands, npm scripts, options, and exit behavior.
99
+ - [Images and Metadata](images-and-metadata.md) explains managed variants and
100
+ published URLs.
101
+ - [Command Organization](design/command-organization.md) explains standalone,
102
+ embedded, and engine-development command models.
103
+ - [Site Examples Structure](design/site-examples-structure.md) distinguishes
104
+ starters, examples, documentation sites, and fixtures.
105
+
106
+ ## Command And Platform Reference
107
+
108
+ - [Commands](commands.md): CLI commands, npm scripts, and options.
82
109
  - [Requirements and limitations](requirements.md): runtime dependencies,
83
- optional tools, and current product boundaries.
110
+ optional tools, and current boundaries.
111
+ - [Publishing](publishing.md): GitHub Pages workflow and deploy helpers.
84
112
 
85
113
  ## Troubleshooting
86
114
 
package/docs/commands.md CHANGED
@@ -10,8 +10,17 @@ inside a project that declares and has installed its own `@janga/norna`
10
10
  dependency, the launcher delegates to that project-local version. If no
11
11
  project-local install is found, the version that was started continues running.
12
12
 
13
- Use direct `norna ...` commands only when the binary is on your shell `PATH`,
14
- inside an npm script, or through `npm exec -- norna ...`.
13
+ The project-owned `norna:*` npm scripts are the portable default for both
14
+ standalone and embedded sites. To use direct commands from an ordinary shell,
15
+ install the launcher once:
16
+
17
+ ```sh
18
+ npm install --global @janga/norna@latest
19
+ ```
20
+
21
+ You can then use commands such as `norna dev`, `norna check`, and
22
+ `norna build`. The launcher still delegates to the current project's locally
23
+ installed and pinned Norna version.
15
24
 
16
25
  ## CLI Commands
17
26
 
@@ -22,17 +31,19 @@ norna dev:restart
22
31
  norna dev:status
23
32
  norna dev:logs
24
33
  norna dev:stop
34
+ norna check
25
35
  norna config:check
26
36
  norna content:check
27
37
  norna content:sync
38
+ norna theme:presets
28
39
  norna theme:export <preset>
29
- norna typography presets
40
+ norna typography profiles
30
41
  norna typography show
31
42
  norna site:public
32
43
  norna images
33
44
  norna engine:update [version|latest]
34
45
  norna engine:version [--latest]
35
- norna init <target-dir> [--type pure|embedded] [--site-dir <path>]
46
+ norna init <target-dir> [--type standalone|embedded] [--site-dir <path>]
36
47
  norna build
37
48
  norna build:local
38
49
  norna deploy
@@ -50,8 +61,9 @@ norna --site-dir <path> <command>
50
61
  norna --help
51
62
  ```
52
63
 
53
- `norna dev` is accepted as an alias for `dev:local`. `help`, `-h`, and
54
- `--help` print usage.
64
+ `norna dev` is accepted as an alias for `dev:local`. `norna check` runs the
65
+ configuration and content checks in sequence. `help`, `-h`, and `--help` print
66
+ usage.
55
67
 
56
68
  ## Starter npm Scripts
57
69
 
@@ -59,10 +71,9 @@ The starter uses `norna:*` for norna-specific work. This avoids collisions
59
71
  when a Norna site is embedded inside a larger GitHub project
60
72
  whose own `build`, `test`, or deploy scripts mean something different.
61
73
 
62
- The starter defines:
74
+ The stable project scripts are:
63
75
 
64
76
  ```sh
65
- npm run dev
66
77
  npm run norna:dev
67
78
  npm run norna:dev:lan
68
79
  npm run norna:dev:restart
@@ -73,8 +84,9 @@ npm run norna:check
73
84
  npm run norna:config:check
74
85
  npm run norna:content:check
75
86
  npm run norna:sync
87
+ npm run norna:theme:presets
76
88
  npm run norna:theme:export -- <preset>
77
- npm run norna:typography:presets
89
+ npm run norna:typography:profiles
78
90
  npm run norna:typography:show
79
91
  npm run norna:public
80
92
  npm run norna:images
@@ -87,11 +99,10 @@ npm run norna:doctor
87
99
  npm run norna:preview
88
100
  npm run norna:engine:update
89
101
  npm run norna:engine:version
90
- npm run build
91
102
  ```
92
103
 
93
- `npm run dev` calls `npm run norna:dev`. In the pure starter,
94
- `npm run build` aliases `npm run norna:build`. In mixed repositories, such as
104
+ The standalone starter also provides `npm run dev` and `npm run build` as
105
+ convenience aliases. In mixed repositories, such as
95
106
  a GitHub project that embeds a Norna site next to an app, `build`
96
107
  should normally mean the repository's complete publishable artifact, while
97
108
  `norna:build` builds only the `norna` part.
@@ -101,19 +112,22 @@ should normally mean the repository's complete publishable artifact, while
101
112
  - `doctor`: prints resolved engine root, site project root, site directory,
102
113
  content/config/image/public paths, generated manifest, Astro output paths, and
103
114
  cache path.
104
- - `config:check`: validates `site/config.md` against the runtime config
115
+ - `config:check`: validates `site/config.yaml` against the runtime config
105
116
  reader.
106
- - `content:check`: validates section structure, managed media references,
117
+ - `check`: runs `config:check` followed by `content:check`.
118
+ - `content:check`: validates section structure, Norna block references,
107
119
  inline styles, and common content mistakes.
108
120
  - `content:sync` / `norna:sync`: moves misplaced referenced image files after
109
121
  confirmation when the intended move is unambiguous. Moving files between the
110
122
  homepage and routes, or between routes, requires a clean Git working tree.
123
+ - `theme:presets`: lists the available complete theme presets and explains the
124
+ intended use of each one.
111
125
  - `theme:export <preset>`: writes a protected, commented
112
- `orig-<preset>-theme.md` reference under the selected site directory. The
126
+ `orig-<preset>-theme.yaml` reference under the selected site directory. The
113
127
  available complete theme presets are `portfolio`, `documentation`,
114
- `project`, and `statement`. Norna continues to load only `theme.md`.
115
- - `typography presets`: prints the exact built-in values for typography
116
- presets and rhythms.
128
+ `project`, and `statement`. Norna continues to load only `theme.yaml`.
129
+ - `typography profiles`: prints the exact built-in values for typography
130
+ profiles and rhythms.
117
131
  - `typography show`: prints the selected site's resolved typography for the
118
132
  theme, every page route, and every section. Each value includes its source,
119
133
  and inherited page or section values are marked with `inherited: true`.
@@ -131,10 +145,10 @@ should normally mean the repository's complete publishable artifact, while
131
145
  - `engine:version [--latest]`: prints the declared site dependency, installed
132
146
  engine version, engine root, Astro dependency, and installed Astro version.
133
147
  With `--latest`, it also asks npm for the latest published engine version.
134
- - `init <target-dir> [--type pure|embedded] [--site-dir <path>]`: creates a
148
+ - `init <target-dir> [--type standalone|embedded] [--site-dir <path>]`: creates a
135
149
  standalone site project from the packaged starter, or adds a Norna site
136
150
  directory plus `norna:*` scripts to an existing project in embedded mode.
137
- Pure setup pins `@janga/norna` to the version that created it.
151
+ Standalone setup pins `@janga/norna` to the version that created it.
138
152
  - `build`: runs config check, content check, public sync, image generation, and
139
153
  Astro build.
140
154
  - `build:local`: runs `build` and restarts `dev:local`.
@@ -1,138 +1,119 @@
1
- # Configuration
1
+ # `config.yaml`
2
2
 
3
- Technical site configuration lives in the selected site's `config.md`; by
4
- default that is `site/config.md`. The file contains YAML frontmatter only.
3
+ Technical site configuration lives in the selected site's `config.yaml`; by
4
+ default that is `site/config.yaml`. The file is required and contains plain
5
+ YAML without Markdown frontmatter delimiters.
5
6
 
6
7
  A normal configuration needs only the public URL:
7
8
 
8
9
  ```yaml
9
- ---
10
10
  url: https://example.com/
11
- ---
12
11
  ```
13
12
 
14
13
  Norna deliberately keeps this file small. Visual choices belong in
15
- `theme.md`; shared identity, banners and footer content belong in
16
- `sitewide-content.md`.
14
+ [`theme.yaml`](theme.md), shared editorial content belongs in
15
+ [`sitewide-content.yaml`](sitewide-content.md), and page content belongs in
16
+ [`content.md`](content.md).
17
17
 
18
18
  ## `url`
19
19
 
20
- - Purpose: canonical public URL and the source of the site's deployment path.
20
+ - Purpose: canonical public URL and source of the site's deployment path.
21
21
  - Type: absolute `http` or `https` URL.
22
22
  - Required: yes.
23
23
  - Default: none.
24
24
  - Restrictions: no query string or fragment.
25
25
 
26
- Norna adds a trailing slash when it is omitted. The URL pathname becomes the
27
- base path for generated links, favicons and managed images, so there is no
26
+ Norna adds a trailing slash when omitted. The URL pathname becomes the base
27
+ path for generated links, browser icons, and managed images, so there is no
28
28
  separate `basePath` setting.
29
29
 
30
30
  Root-hosted site or custom domain:
31
31
 
32
32
  ```yaml
33
- ---
34
33
  url: https://example.com/
35
- ---
36
34
  ```
37
35
 
38
36
  GitHub Pages project site:
39
37
 
40
38
  ```yaml
41
- ---
42
39
  url: https://owner.github.io/repository-name/
43
- ---
44
40
  ```
45
41
 
46
42
  In the second example, Norna derives `/repository-name/` as the base path.
47
- Root-relative links written in Markdown are prefixed when rendered.
43
+ Root-relative Markdown links are prefixed when rendered.
48
44
 
49
45
  ## `language`
50
46
 
51
- - Purpose: language tag rendered on the root `<html lang="...">` element and
52
- selection of Norna's built-in interface text.
53
- - Type: language tag such as `en`, `en-GB`, `sv` or `sv-SE`.
47
+ - Purpose: language tag on the root `<html lang="...">` element and selection
48
+ of Norna's built-in interface text.
49
+ - Type: `en`, `sv`, or a regional tag such as `en-GB` or `sv-SE`.
54
50
  - Required: no.
55
51
  - Default: `en`.
56
52
 
57
- Norna currently includes interface text for English and Swedish. Regional tags
58
- use the language identified by their primary subtag. An unsupported language is
59
- an error because silently rendering English controls on another-language pages
53
+ Norna includes interface text for English and Swedish. Regional tags use the
54
+ language identified by their primary subtag. An unsupported language is an
55
+ error because silently rendering English controls on another-language page
60
56
  would be misleading.
61
57
 
62
58
  Interface labels are part of the engine and are not configured individually.
63
- Editorial text remains in `content.md`, route content files and
64
- `sitewide-content.md`.
59
+ Editorial text remains in page content and `sitewide-content.yaml`.
65
60
 
66
- ## `smoothScroll`
61
+ ## `scrollBehavior`
67
62
 
68
- - Purpose: enables smooth same-page anchor movement.
69
- - Type: boolean.
63
+ - Purpose: select native same-page anchor movement.
64
+ - Type: `instant` or `smooth`.
70
65
  - Required: no.
71
- - Default: `false`.
66
+ - Default: `instant`.
72
67
 
73
- Example:
68
+ Example using the browser's native smooth scrolling:
74
69
 
75
70
  ```yaml
76
- ---
77
71
  url: https://example.com/
78
- smoothScroll: true
79
- ---
72
+ scrollBehavior: smooth
80
73
  ```
81
74
 
82
- Norna uses the browser's native CSS scrolling behavior rather than a scripted
83
- animation. Visitors whose system requests reduced motion always get immediate
84
- anchor movement.
75
+ Norna does not add a scripted scrolling implementation. Visitors whose system
76
+ requests reduced motion always get immediate anchor movement.
85
77
 
86
78
  ## Complete Example
87
79
 
88
80
  ```yaml
89
- ---
90
81
  url: https://example.com/
91
- language: en
92
- smoothScroll: false
93
- ---
82
+ language: en-GB
83
+ scrollBehavior: instant
94
84
  ```
95
85
 
96
- Do not add Markdown below the closing `---`; `config.md` is frontmatter-only.
97
- Run `npm run norna:config:check` after changing it.
98
-
99
- ## Related Files
100
-
101
- - [`theme.md`](theme.md) selects a complete presentation preset and optional
102
- focused overrides.
103
- - [`sitewide-content.md`](sitewide-content.md) contains shared identity,
104
- banners and footer content.
105
- - [`content.md`](content.md) and route content files contain page content.
86
+ Run `norna config:check` after changing the file.
106
87
 
107
88
  ## Publishing Discovery
108
89
 
109
- GitHub repository, default branch and deploy workflow are not site
110
- configuration fields.
90
+ GitHub repository, default branch, and deploy workflow are not fields in
91
+ `config.yaml`.
111
92
 
112
- `norna deploy` discovers the current GitHub repository and its default branch
93
+ `norna deploy` discovers the current GitHub repository and default branch
113
94
  through the authenticated GitHub CLI. Norna's included workflow file is
114
95
  `.github/workflows/deploy.yml`. `deploy:watch` accepts command-line overrides
115
- such as `--repo`, `--branch`, `--workflow`, `--interval`, `--timeout` and
116
- `--limit` when a one-off run needs different values.
96
+ when a one-off run needs different operational values.
117
97
 
118
98
  See [Publishing](publishing.md) for the complete workflow.
119
99
 
120
100
  ## Site Directory Selection
121
101
 
122
- The site directory is not configured in `config.md`.
102
+ The site directory is not configured in `config.yaml`.
123
103
 
124
104
  Use one of:
125
105
 
126
106
  ```sh
127
- NORNA_SITE_DIR=my-site npm run norna:build
128
- norna --site-dir my-site build
107
+ NORNA_SITE_DIR=presentation norna build
108
+ norna --site-dir presentation build
129
109
  ```
130
110
 
131
111
  If `NORNA_SITE_DIR` is set to an empty value, commands fail. Relative site
132
- directories are resolved by walking upward from the invocation root until the
133
- selected directory contains `config.md` and `content.md`. Absolute site
134
- directories are accepted and make their parent the site project root.
112
+ directories are resolved by walking upward from the invocation directory until
113
+ the selected directory contains `config.yaml` and `content.md`.
114
+
115
+ Without an explicit selection, the current directory itself can be the site
116
+ directory when it contains those two files. Otherwise Norna walks upward for a
117
+ default `site/` directory containing them.
135
118
 
136
- When no site directory is explicitly selected, the current directory itself
137
- can be the site directory if it contains `config.md` and `content.md`. If not,
138
- Norna walks upward looking for a default `site/` directory with those files.
119
+ See [Site Files](site-files.md) for the complete source and generated layout.
package/docs/content.md CHANGED
@@ -4,10 +4,10 @@
4
4
  metadata in frontmatter and the homepage content in Markdown.
5
5
 
6
6
  Route pages use the same page model in
7
- `site/routes/<NNN-route-id>/route-content.md`. See [Routes](routes.md) for the
7
+ `site/routes/<NNN-route-id>/content.md`. See [Routes](routes.md) for the
8
8
  route-specific rules.
9
9
 
10
- Site-wide visual defaults belong in [Theme](theme.md). Typography presets and
10
+ Site-wide visual defaults belong in [Theme](theme.md). Typography profiles and
11
11
  overrides are described in [Typography](typography.md). Technical site settings
12
12
  belong in [Configuration](configuration.md).
13
13
 
@@ -90,7 +90,7 @@ page file:
90
90
  Do not list sections in frontmatter just to define order. Section order comes
91
91
  from the Markdown heading order.
92
92
 
93
- ## Managed Media Blocks
93
+ ## Norna Blocks
94
94
 
95
95
  Norna-managed local images and cards are written in Markdown fenced blocks at
96
96
  the point where they should appear in the section. Markdown determines
@@ -207,7 +207,7 @@ Route images live under:
207
207
  site/routes/<NNN-route-id>/images/<section-id>/
208
208
  ```
209
209
 
210
- Image references in Norna managed media blocks use only the filename:
210
+ Image references in Norna managed image blocks use only the filename:
211
211
 
212
212
  ````md
213
213
  ```norna-image-stack
@@ -277,9 +277,36 @@ This sentence contains **important text** and *emphasised text*.
277
277
 
278
278
  Norna intentionally does not support arbitrary inline color or style classes.
279
279
  Deprecated syntax such as `[highlighted text]{.yellow}` is rejected by
280
- `content:check`. Keep the route visually coherent through its `theme.md`
280
+ `content:check`. Keep the route visually coherent through its `theme.yaml`
281
281
  instead of styling individual phrases.
282
282
 
283
+ ### Side Notes
284
+
285
+ Add one numbered side note to a paragraph by placing `{note-ref}` where its
286
+ reference number should appear, then write the matching note on its own line
287
+ immediately after the paragraph:
288
+
289
+ ```md
290
+ Norna keeps the page source readable.{note-ref}
291
+
292
+ {note: The note appears in the margin when enough horizontal space is available.}
293
+ ```
294
+
295
+ Longer notes may wrap across lines and end with `}` on its own line:
296
+
297
+ ```md
298
+ Norna keeps the page source readable.{note-ref}
299
+
300
+ {note:
301
+ The note may contain a longer explanation when the extra context is useful.
302
+ }
303
+ ```
304
+
305
+ On wide screens Norna places the note in the reading margin. On narrower
306
+ screens it remains in the normal reading flow. A paragraph may contain one
307
+ note pair; both `{note-ref}` and `{note: ...}` are required. `content:check`
308
+ reports missing, repeated, nested, or unpaired note syntax.
309
+
283
310
  ## Validation And Sync
284
311
 
285
312
  Run:
@@ -290,7 +317,7 @@ npm run norna:content:check
290
317
 
291
318
  This checks section heading ids, section metadata, duplicate image names,
292
319
  missing image files, misplaced referenced images, duplicate image references,
293
- invalid managed media blocks, unreferenced images, removed inline style syntax,
320
+ invalid Norna blocks, unreferenced images, removed inline style syntax,
294
321
  Markdown image references to unmanaged local files, and common frontmatter
295
322
  indentation and structure mistakes.
296
323
 
@@ -308,7 +335,7 @@ sections:
308
335
 
309
336
  Top-level page frontmatter may contain only `title`, `description`,
310
337
  `navigation`, and `sections`. Visual settings belong in the root or route-local
311
- `theme.md`.
338
+ `theme.yaml`.
312
339
 
313
340
  Run:
314
341