@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.
- package/README.md +15 -9
- package/bin/norna-cli.mjs +11 -4
- package/docs/README.md +71 -43
- package/docs/commands.md +34 -20
- package/docs/configuration.md +43 -62
- package/docs/content.md +34 -7
- package/docs/design/command-organization.md +15 -8
- package/docs/design/norna-diagram-design.md +6 -6
- package/docs/design/site-examples-structure.md +1 -1
- package/docs/engine-development.md +22 -9
- package/docs/getting-started.md +29 -16
- package/docs/how-to/embedded-site.md +1 -1
- package/docs/images-and-metadata.md +3 -3
- package/docs/local-development.md +11 -3
- package/docs/public-files.md +105 -0
- package/docs/publishing.md +4 -8
- package/docs/routes.md +6 -7
- package/docs/site-files.md +144 -0
- package/docs/sitewide-content.md +47 -33
- package/docs/theme.md +37 -49
- package/docs/typography.md +25 -31
- package/examples/complete-sites/dog-shelter-multi-page/README.md +8 -0
- package/examples/complete-sites/{dog-shelter-single-page/site/config.md → dog-shelter-multi-page/site/config.yaml} +0 -2
- package/examples/complete-sites/dog-shelter-multi-page/site/sitewide-content.yaml +6 -0
- package/examples/complete-sites/dog-shelter-multi-page/site/{theme.md → theme.yaml} +0 -2
- package/examples/complete-sites/dog-shelter-single-page/README.md +8 -0
- package/examples/complete-sites/{dog-shelter-multi-page/site/config.md → dog-shelter-single-page/site/config.yaml} +0 -2
- package/examples/complete-sites/dog-shelter-single-page/site/sitewide-content.yaml +6 -0
- package/examples/complete-sites/dog-shelter-single-page/site/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/media-and-surfaces/.astro/data-store.json +1 -1
- package/examples/feature-demos/media-and-surfaces/README.md +1 -1
- package/examples/feature-demos/media-and-surfaces/site/{config.md → config.yaml} +0 -2
- package/examples/feature-demos/media-and-surfaces/site/content.md +2 -2
- package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/{route-content.md → content.md} +3 -7
- package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/theme.yaml +3 -0
- package/examples/feature-demos/media-and-surfaces/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
- package/examples/feature-demos/media-and-surfaces/site/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/sitewide-content/README.md +8 -0
- package/examples/feature-demos/sitewide-content/site/{config.md → config.yaml} +0 -2
- package/examples/feature-demos/sitewide-content/site/routes/010-identity/{route-content.md → content.md} +3 -3
- package/examples/feature-demos/sitewide-content/site/routes/020-notices/{route-content.md → content.md} +1 -1
- package/examples/feature-demos/sitewide-content/site/routes/030-footer/{route-content.md → content.md} +1 -1
- package/examples/feature-demos/sitewide-content/site/{sitewide-content.md → sitewide-content.yaml} +1 -11
- package/examples/feature-demos/sitewide-content/site/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/theme-presets/site/config.yaml +1 -0
- package/examples/feature-demos/theme-presets/site/routes/010-portfolio/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/theme-presets/site/routes/020-documentation/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/theme-presets/site/routes/030-project/theme.yaml +1 -0
- package/examples/feature-demos/theme-presets/site/routes/040-statement/{route-content.md → content.md} +1 -1
- package/examples/feature-demos/theme-presets/site/routes/040-statement/{theme.md → theme.yaml} +0 -2
- package/examples/feature-demos/theme-presets/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
- package/examples/feature-demos/theme-presets/site/theme.yaml +1 -0
- package/fixtures/basic/site/{config.md → config.yaml} +0 -2
- package/fixtures/basic/site/content.md +3 -3
- package/fixtures/basic/site/{sitewide-content.md → sitewide-content.yaml} +0 -2
- package/fixtures/basic/site/{theme.md → theme.yaml} +3 -6
- package/fixtures/content-model-v2/site/{config.md → config.yaml} +0 -2
- package/fixtures/content-model-v2/site/theme.yaml +4 -0
- package/package.json +10 -3
- package/schemas/config.schema.json +77 -0
- package/schemas/content-frontmatter.schema.json +81 -0
- package/schemas/manifest.json +9 -0
- package/schemas/sitewide-content.schema.json +215 -0
- package/schemas/theme.schema.json +1208 -0
- package/scripts/check-config.mjs +18 -11
- package/scripts/export-theme-preset.mjs +1 -1
- package/scripts/generate-schemas.mjs +283 -0
- package/scripts/init-site.mjs +22 -27
- package/scripts/lib/documentation-links.mjs +8 -0
- package/scripts/lib/editor-language-service.mjs +609 -0
- package/scripts/lib/example-sites.mjs +2 -2
- package/scripts/lib/git-status.mjs +7 -0
- package/scripts/lib/logo-assets.mjs +15 -10
- package/scripts/lib/norna-markdown-blocks.mjs +90 -11
- package/scripts/lib/presentation.mjs +23 -12
- package/scripts/lib/project-config.mjs +17 -41
- package/scripts/lib/public-asset-conventions.mjs +112 -0
- package/scripts/lib/schema-definitions.mjs +213 -0
- package/scripts/lib/schema-value-definitions.mjs +86 -0
- package/scripts/lib/site-content.mjs +24 -18
- package/scripts/lib/site-paths.mjs +4 -8
- package/scripts/lib/sitewide-content.mjs +24 -0
- package/scripts/lib/theme-config.mjs +15 -35
- package/scripts/lib/theme-presets.mjs +76 -66
- package/scripts/lib/typography.mjs +15 -15
- package/scripts/lib/yaml-config.mjs +50 -0
- package/scripts/list-theme-presets.mjs +15 -0
- package/scripts/release.mjs +84 -8
- package/scripts/show-typography.mjs +22 -46
- package/scripts/sync-content-sections.mjs +2 -2
- package/scripts/test-client-javascript.mjs +28 -28
- package/scripts/test-content-check.mjs +21 -26
- package/scripts/test-content-model-v2.mjs +72 -40
- package/scripts/test-documentation.mjs +70 -4
- package/scripts/test-editor-language-service.mjs +158 -0
- package/scripts/test-engine-commands.mjs +65 -34
- package/scripts/test-package-check.mjs +37 -30
- package/scripts/test-project-config.mjs +15 -20
- package/scripts/test-schemas.mjs +102 -0
- package/scripts/test-temporary-visibility.mjs +5 -13
- package/scripts/test-theme-presets.mjs +64 -37
- package/src/components/CardList.astro +2 -5
- package/src/components/ImageCarousel.astro +21 -21
- package/src/components/{GalleryGrid.astro → ImageStack.astro} +12 -12
- package/src/components/SectionNavigationScript.astro +28 -0
- package/src/components/SiteNavigation.astro +6 -5
- package/src/components/SitePage.astro +8 -8
- package/src/components/SiteSection.astro +18 -21
- package/src/content.config.ts +17 -209
- package/src/layouts/BaseLayout.astro +9 -9
- package/src/lib/{galleryImages.ts → imagePresentation.ts} +7 -7
- package/src/lib/routeThemes.ts +9 -29
- package/src/lib/sectionContent.ts +3 -3
- package/src/lib/sitePublicAssets.ts +5 -21
- package/src/styles/global.css +73 -73
- package/starters/basic/.github/workflows/deploy.yml +1 -1
- package/starters/basic/README.md +16 -13
- package/starters/basic/package.json +3 -2
- package/starters/basic/site/{config.md → config.yaml} +0 -2
- package/starters/basic/site/content.md +1 -1
- package/starters/basic/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
- package/starters/basic/site/{theme.md → theme.yaml} +8 -15
- package/starters/project/.github/workflows/deploy.yml +1 -1
- package/starters/project/README.md +22 -15
- package/starters/project/package.json +3 -2
- package/starters/project/site/{config.md → config.yaml} +0 -2
- package/starters/project/site/{sitewide-content.md → sitewide-content.yaml} +1 -3
- package/starters/project/site/{theme.md → theme.yaml} +4 -8
- package/docs/site-structure.md +0 -98
- package/examples/complete-sites/dog-shelter-multi-page/site/sitewide-content.md +0 -16
- package/examples/complete-sites/dog-shelter-single-page/site/sitewide-content.md +0 -16
- package/examples/feature-demos/media-and-surfaces/site/routes/020-surfaces/theme.md +0 -8
- package/examples/feature-demos/theme-presets/site/config.md +0 -3
- package/examples/feature-demos/theme-presets/site/routes/030-project/theme.md +0 -3
- package/examples/feature-demos/theme-presets/site/theme.md +0 -3
- package/fixtures/content-model-v2/site/theme.md +0 -7
- package/scripts/lib/sitewide-config.mjs +0 -34
- package/src/components/MobileSectionNavigationScript.astro +0 -14
- /package/examples/complete-sites/dog-shelter-multi-page/site/routes/010-dogs/{route-content.md → content.md} +0 -0
- /package/examples/complete-sites/dog-shelter-multi-page/site/routes/020-adopt/{route-content.md → content.md} +0 -0
- /package/examples/feature-demos/media-and-surfaces/site/routes/010-media/{route-content.md → content.md} +0 -0
- /package/examples/feature-demos/theme-presets/site/routes/010-portfolio/{route-content.md → content.md} +0 -0
- /package/examples/feature-demos/theme-presets/site/routes/020-documentation/{route-content.md → content.md} +0 -0
- /package/examples/feature-demos/theme-presets/site/routes/030-project/{route-content.md → content.md} +0 -0
- /package/fixtures/content-model-v2/site/routes/010-guide/{route-content.md → content.md} +0 -0
- /package/starters/project/site/routes/010-guide/{route-content.md → content.md} +0 -0
|
@@ -49,6 +49,13 @@ interface. They may provide unprefixed aliases when the alias means the same
|
|
|
49
49
|
thing for the whole repository, for example `npm run build` as an alias for
|
|
50
50
|
`npm run norna:build`.
|
|
51
51
|
|
|
52
|
+
### Direct CLI Shortcut
|
|
53
|
+
|
|
54
|
+
Users may install `@janga/norna` globally as a cross-platform launcher and use
|
|
55
|
+
`norna dev`, `norna check`, or `norna build`. The launcher must delegate to the
|
|
56
|
+
current project's installed Norna version, so this shortcut does not replace
|
|
57
|
+
the project dependency or its lockfile.
|
|
58
|
+
|
|
52
59
|
### Project Commands That Call Norna Commands
|
|
53
60
|
|
|
54
61
|
`norna` does not define a consuming project's unprefixed commands. Names
|
|
@@ -174,17 +181,17 @@ npx @janga/norna@latest init my-site
|
|
|
174
181
|
The initializer should support two setup modes that share the same `norna:*`
|
|
175
182
|
command vocabulary.
|
|
176
183
|
|
|
177
|
-
####
|
|
184
|
+
#### Standalone Setup
|
|
178
185
|
|
|
179
|
-
|
|
186
|
+
Standalone setup creates a new project where the Norna site is the whole repository:
|
|
180
187
|
|
|
181
188
|
```sh
|
|
182
|
-
npx @janga/norna@latest init my-site --type
|
|
189
|
+
npx @janga/norna@latest init my-site --type standalone
|
|
183
190
|
```
|
|
184
191
|
|
|
185
192
|
This should be the default when the target is a new or empty directory.
|
|
186
193
|
|
|
187
|
-
|
|
194
|
+
Standalone setup should create:
|
|
188
195
|
|
|
189
196
|
- a normal site source directory, normally `site/`;
|
|
190
197
|
- a `package.json` with `norna:*` scripts;
|
|
@@ -271,13 +278,13 @@ Commands that inspect site presentation without changing source files use
|
|
|
271
278
|
`norna:*` in consuming repositories:
|
|
272
279
|
|
|
273
280
|
```sh
|
|
274
|
-
npm run norna:typography:
|
|
281
|
+
npm run norna:typography:profiles
|
|
275
282
|
npm run norna:typography:show
|
|
276
283
|
```
|
|
277
284
|
|
|
278
|
-
`norna:typography:
|
|
285
|
+
`norna:typography:profiles` shows the built-in typography profiles and rhythms
|
|
279
286
|
from the installed engine. `norna:typography:show` shows the effective
|
|
280
|
-
typography for the selected site after
|
|
287
|
+
typography for the selected site after profiles, rhythms, and overrides have
|
|
281
288
|
been applied.
|
|
282
289
|
|
|
283
290
|
### Correct Content And Configuration
|
|
@@ -295,7 +302,7 @@ Messages emitted by the engine should mention the direct CLI command and the
|
|
|
295
302
|
starter-style npm wrapper when suggesting a fix.
|
|
296
303
|
|
|
297
304
|
Configuration edits are normally manual edits to the selected site
|
|
298
|
-
`config.
|
|
305
|
+
`config.yaml`, followed by:
|
|
299
306
|
|
|
300
307
|
```sh
|
|
301
308
|
npm run norna:config:check
|
|
@@ -67,18 +67,18 @@ Diagrams must match the current Norna model:
|
|
|
67
67
|
|
|
68
68
|
- A Norna site is described with site files, not arbitrary project structure.
|
|
69
69
|
- `content.md` is the homepage content file.
|
|
70
|
-
- `sitewide-content.
|
|
70
|
+
- `sitewide-content.yaml` contains shared site identity, banners, and footer
|
|
71
71
|
content.
|
|
72
|
-
- Additional pages are route directories with `
|
|
72
|
+
- Additional pages are route directories with `content.md`.
|
|
73
73
|
- Route folder prefixes control route presentation order.
|
|
74
74
|
- Route ids become default URL slugs.
|
|
75
75
|
- Images belong under the image root for the page or route, usually grouped by
|
|
76
76
|
section id.
|
|
77
77
|
- Markdown remains the primary writing format.
|
|
78
|
-
- Norna
|
|
78
|
+
- Norna blocks cover fixed site patterns such as image stacks,
|
|
79
79
|
carousels, and card lists.
|
|
80
|
-
- `theme.
|
|
81
|
-
- `config.
|
|
80
|
+
- `theme.yaml` controls visual presentation.
|
|
81
|
+
- `config.yaml` controls the public URL and optional language and smooth
|
|
82
82
|
scrolling.
|
|
83
83
|
- `dist/` is generated static output.
|
|
84
84
|
- GitHub Pages is the integrated publishing target today.
|
|
@@ -111,7 +111,7 @@ Store diagram SVG files as normal Norna managed image assets:
|
|
|
111
111
|
site/routes/<NNN-route-id>/images/<section-id>/<diagram-name>.svg
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
Reference them with a Norna
|
|
114
|
+
Reference them with a Norna image block:
|
|
115
115
|
|
|
116
116
|
````md
|
|
117
117
|
<!-- norna-image-provenance:
|
|
@@ -81,7 +81,7 @@ together in a realistic project:
|
|
|
81
81
|
|
|
82
82
|
- `theme-presets/`: one route per complete built-in theme preset, without
|
|
83
83
|
overrides.
|
|
84
|
-
- `media-and-surfaces/`:
|
|
84
|
+
- `media-and-surfaces/`: image and card blocks, notes, palettes and section
|
|
85
85
|
surfaces. This is also the broad demo-build and navigation-test target.
|
|
86
86
|
- `sitewide-content/`: convention-based identity, navigation, banner stacks,
|
|
87
87
|
dismissal and footer content shared across routes.
|
|
@@ -7,7 +7,7 @@ This document is for work on the reusable `norna` package itself.
|
|
|
7
7
|
- `bin/norna.mjs`: public CLI launcher and local-version resolver.
|
|
8
8
|
- `bin/norna-cli.mjs`: public CLI command dispatcher.
|
|
9
9
|
- `scripts/lib/site-paths.mjs`: engine/site path resolution.
|
|
10
|
-
- `scripts/lib/project-config.mjs`:
|
|
10
|
+
- `scripts/lib/project-config.mjs`: plain YAML `site/config.yaml`
|
|
11
11
|
validation, defaults and derived URL path.
|
|
12
12
|
- `scripts/sync-content-sections.mjs`: content validation and sync behavior.
|
|
13
13
|
- `scripts/generate-images.mjs`: managed image pipeline and manifest.
|
|
@@ -62,6 +62,12 @@ npm run dev:local
|
|
|
62
62
|
npm run build
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
Inside the engine repository, use npm scripts or explicitly run
|
|
66
|
+
`node bin/norna.mjs ...`. Do not rely on a bare `norna ...` command there: a
|
|
67
|
+
globally installed launcher deliberately does not delegate to another package
|
|
68
|
+
whose own name is `@janga/norna`, so it may continue with the published global
|
|
69
|
+
implementation instead of the working tree.
|
|
70
|
+
|
|
65
71
|
The media-and-surfaces feature demo is the broad visual and navigation
|
|
66
72
|
diagnostic target:
|
|
67
73
|
|
|
@@ -130,17 +136,18 @@ The installed `norna` command is created from the package `bin` field. The
|
|
|
130
136
|
launcher first looks for the nearest project `package.json`. If that project
|
|
131
137
|
declares `@janga/norna` and Node can resolve an installed copy from that project
|
|
132
138
|
root, the launcher delegates to that local entrypoint. The engine repository
|
|
133
|
-
itself is excluded from delegation
|
|
134
|
-
|
|
139
|
+
itself is excluded from delegation to prevent recursion; its working tree is
|
|
140
|
+
selected explicitly through npm scripts or `node bin/norna.mjs`.
|
|
135
141
|
|
|
136
142
|
## npm Release
|
|
137
143
|
|
|
138
144
|
The npm package is published under the `@janga` scope. Choose the release type
|
|
139
145
|
when starting a release; the command requires a clean working tree, verifies npm
|
|
140
146
|
registry authentication for the same registry/cache used by the publish step,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
updates `package.json` and `package-lock.json` without creating a commit, and
|
|
148
|
+
regenerates schemas with documentation links pinned to the new `v<version>` Git
|
|
149
|
+
tag. It then runs `npm test`, verifies that only release files changed, creates
|
|
150
|
+
the release commit and Git tag, publishes to npm, and pushes the commit and tag.
|
|
144
151
|
|
|
145
152
|
```sh
|
|
146
153
|
npm run release:patch
|
|
@@ -155,8 +162,14 @@ npm run release:major
|
|
|
155
162
|
```
|
|
156
163
|
|
|
157
164
|
The release command deliberately does not run GitHub Pages deployment monitoring.
|
|
165
|
+
If version preparation, schema generation, or testing fails before the release
|
|
166
|
+
commit, the script restores the previous package version and generated schemas.
|
|
167
|
+
|
|
158
168
|
If npm publication fails, it stops before pushing; the local version commit and
|
|
159
|
-
tag remain available for inspection or recovery.
|
|
169
|
+
tag remain available for inspection or recovery. Retry publication with
|
|
170
|
+
`npm run release:publish`, then push the existing commit and tag with
|
|
171
|
+
`git push --follow-tags`. Do not start a new version bump merely to retry these
|
|
172
|
+
steps.
|
|
160
173
|
|
|
161
174
|
If the npm authentication preflight fails, no version commit or tag has been
|
|
162
175
|
created yet. Run the printed login command:
|
|
@@ -173,7 +186,7 @@ and commit their updated `package-lock.json`.
|
|
|
173
186
|
## Rendering Notes
|
|
174
187
|
|
|
175
188
|
The renderer builds the homepage at `/` and optional first-level routes from
|
|
176
|
-
`site/routes/<NNN-route-id>/
|
|
189
|
+
`site/routes/<NNN-route-id>/content.md`.
|
|
177
190
|
|
|
178
191
|
Navigation has two separate levels:
|
|
179
192
|
|
|
@@ -201,5 +214,5 @@ anchor movement; Norna does not run a separate scroll animation or retry anchor
|
|
|
201
214
|
positions after later layout shifts.
|
|
202
215
|
|
|
203
216
|
The shared layout selects Norna's built-in UI labels from the optional
|
|
204
|
-
`language` in `site/config.
|
|
217
|
+
`language` in `site/config.yaml`. Keep editorial content in page Markdown and
|
|
205
218
|
non-editorial engine UI labels in the engine language packs.
|
package/docs/getting-started.md
CHANGED
|
@@ -35,13 +35,30 @@ Run these commands from the directory where you keep projects:
|
|
|
35
35
|
npx @janga/norna@latest init my-site
|
|
36
36
|
cd my-site
|
|
37
37
|
npm install
|
|
38
|
-
npm run dev
|
|
38
|
+
npm run norna:dev
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
`init` creates the project before `npm install` runs. The generated
|
|
42
42
|
`package.json` pins the Norna engine version so this project keeps using the
|
|
43
43
|
same version until you update it deliberately.
|
|
44
44
|
|
|
45
|
+
The tutorial uses the `norna:*` npm scripts because they work in both
|
|
46
|
+
standalone and embedded projects. A standalone project also includes the
|
|
47
|
+
shorter `npm run dev` and `npm run build` aliases.
|
|
48
|
+
|
|
49
|
+
### Optional: Shorter CLI Commands
|
|
50
|
+
|
|
51
|
+
Install the Norna launcher globally when you prefer direct commands:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npm install --global @janga/norna@latest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You can then run `norna dev`, `norna check`, and `norna build`. Inside a
|
|
58
|
+
project, the launcher automatically delegates to that project's locally
|
|
59
|
+
installed and pinned Norna version. The global installation is only the
|
|
60
|
+
launcher; keep the local dependency and lockfile.
|
|
61
|
+
|
|
45
62
|
### Checkpoint: The Starter Is Visible
|
|
46
63
|
|
|
47
64
|
Open the URL printed by the development server. It is normally
|
|
@@ -78,35 +95,31 @@ Return to the browser. The page should now contain `Welcome` and `Next`, and
|
|
|
78
95
|
the single-page navigation should link to those two sections. You should not
|
|
79
96
|
need to restart the server.
|
|
80
97
|
|
|
81
|
-
## 3. Set The Shared
|
|
98
|
+
## 3. Set The Shared Identity
|
|
82
99
|
|
|
83
|
-
Replace `site/sitewide-content.
|
|
100
|
+
Replace `site/sitewide-content.yaml` with:
|
|
84
101
|
|
|
85
102
|
```yaml
|
|
86
|
-
---
|
|
87
103
|
navigation:
|
|
88
|
-
|
|
104
|
+
label: My first Norna site
|
|
89
105
|
footer:
|
|
90
106
|
copyrightMessage: My first Norna site.
|
|
91
|
-
---
|
|
92
107
|
```
|
|
93
108
|
|
|
94
|
-
The
|
|
95
|
-
add routes later, they inherit these values.
|
|
109
|
+
The navigation label and footer are site-wide content rather than page
|
|
110
|
+
sections. If you add routes later, they inherit these values.
|
|
96
111
|
|
|
97
|
-
### Checkpoint: The
|
|
112
|
+
### Checkpoint: The Identity Is Shared
|
|
98
113
|
|
|
99
114
|
The navigation should now display `My first Norna site`. The footer should show
|
|
100
115
|
the new message.
|
|
101
116
|
|
|
102
117
|
## 4. Choose A Complete Theme
|
|
103
118
|
|
|
104
|
-
Replace `site/theme.
|
|
119
|
+
Replace `site/theme.yaml` with:
|
|
105
120
|
|
|
106
121
|
```yaml
|
|
107
|
-
---
|
|
108
122
|
preset: project
|
|
109
|
-
---
|
|
110
123
|
```
|
|
111
124
|
|
|
112
125
|
The preset supplies coordinated layout, typography, spacing, image sizing,
|
|
@@ -116,7 +129,7 @@ differ from the preset.
|
|
|
116
129
|
### Checkpoint: The Preset Is Active
|
|
117
130
|
|
|
118
131
|
The browser should refresh with the `project` presentation. Your content files
|
|
119
|
-
remain unchanged because presentation belongs in `theme.
|
|
132
|
+
remain unchanged because presentation belongs in `theme.yaml`.
|
|
120
133
|
|
|
121
134
|
## 5. Check And Build
|
|
122
135
|
|
|
@@ -124,7 +137,7 @@ Open another terminal in `my-site` and run:
|
|
|
124
137
|
|
|
125
138
|
```sh
|
|
126
139
|
npm run norna:check
|
|
127
|
-
npm run build
|
|
140
|
+
npm run norna:build
|
|
128
141
|
```
|
|
129
142
|
|
|
130
143
|
The check should complete without errors. The build should create:
|
|
@@ -144,7 +157,7 @@ build.
|
|
|
144
157
|
|
|
145
158
|
## What To Do Next
|
|
146
159
|
|
|
147
|
-
- [Add and manage images](content.md#
|
|
160
|
+
- [Add and manage images](content.md#norna-blocks)
|
|
148
161
|
- [Add another page](routes.md)
|
|
149
162
|
- [Inspect and adjust the theme](theme.md)
|
|
150
163
|
- [Configure the public URL](configuration.md)
|
|
@@ -164,7 +177,7 @@ reference so you can continue from the kind of question you have.
|
|
|
164
177
|
Start the development server with:
|
|
165
178
|
|
|
166
179
|
```sh
|
|
167
|
-
npm run dev -- --kill
|
|
180
|
+
npm run norna:dev -- --kill
|
|
168
181
|
```
|
|
169
182
|
|
|
170
183
|
This tells Norna to stop the process occupying its standard port before
|
|
@@ -7,7 +7,7 @@ source images and any copyright or licensing policy for those images.
|
|
|
7
7
|
|
|
8
8
|
Norna-managed local images are referenced from Markdown with
|
|
9
9
|
`norna-image-stack`, `norna-image-carousel`, or `norna-card-list` blocks. See
|
|
10
|
-
[Content](content.md#
|
|
10
|
+
[Content](content.md#norna-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
|
-
Managed
|
|
31
|
+
Managed image block references use only the filename:
|
|
32
32
|
|
|
33
33
|
````md
|
|
34
34
|
```norna-image-stack
|
|
@@ -100,7 +100,7 @@ example-work-1a2b3c4d-1440.webp
|
|
|
100
100
|
When a source image changes, the generated URL changes too. This avoids stale
|
|
101
101
|
browser, CDN, and GitHub Actions cache entries at the old URL.
|
|
102
102
|
|
|
103
|
-
SVG files are managed by the same Markdown
|
|
103
|
+
SVG files are managed by the same Markdown image blocks, validation and sync
|
|
104
104
|
model, but they are not rasterized and do not get WebP variants. Norna copies
|
|
105
105
|
the SVG source to:
|
|
106
106
|
|
|
@@ -5,7 +5,7 @@ Use the local preview commands when editing a site or the engine demo.
|
|
|
5
5
|
## Start Preview
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm run dev
|
|
8
|
+
npm run norna:dev
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The wrapper:
|
|
@@ -28,15 +28,23 @@ To stop any process that is blocking the standard port before starting, pass
|
|
|
28
28
|
`--kill`:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
npm run dev -- --kill
|
|
31
|
+
npm run norna:dev -- --kill
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The standalone starter also provides this shorter alias:
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
37
|
npm run dev -- --kill
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
With the optional global launcher installed, the direct form is:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
norna dev --kill
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The launcher selects the current project's locally installed Norna version.
|
|
47
|
+
|
|
40
48
|
## Test On A Phone
|
|
41
49
|
|
|
42
50
|
To make the local dev server available to devices on the same Wi-Fi network:
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Public Files
|
|
2
|
+
|
|
3
|
+
`site/public/` contains static files that Norna copies into the published site
|
|
4
|
+
without managed-image processing. Use it for browser icons, verification files,
|
|
5
|
+
`robots.txt`, a custom-domain `CNAME`, downloadable files, and other assets that
|
|
6
|
+
must keep their original format.
|
|
7
|
+
|
|
8
|
+
Most files and subdirectories under `public/` are site-owned. Logos and browser
|
|
9
|
+
icons are exceptions: Norna discovers a small set of exact filenames by
|
|
10
|
+
convention.
|
|
11
|
+
|
|
12
|
+
## Navigation Logo
|
|
13
|
+
|
|
14
|
+
Put exactly one navigation logo directly in `site/public/`. Its filename must
|
|
15
|
+
be exactly one of:
|
|
16
|
+
|
|
17
|
+
- `logo.svg`
|
|
18
|
+
- `logo.png`
|
|
19
|
+
- `logo.jpg`
|
|
20
|
+
- `logo.jpeg`
|
|
21
|
+
|
|
22
|
+
Use lowercase letters and match the complete filename exactly. This is required
|
|
23
|
+
for portability between case-sensitive and case-insensitive file systems.
|
|
24
|
+
|
|
25
|
+
Norna discovers and displays the file automatically. No configuration path or
|
|
26
|
+
enable switch is needed. Only one supported logo file may exist.
|
|
27
|
+
|
|
28
|
+
The shared navigation label is configured separately:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
navigation:
|
|
32
|
+
label: Example Site
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Without a logo, `label` is shown as navigation text. With a logo, it becomes the
|
|
36
|
+
image alternative text. If `label` is omitted, Norna uses the homepage title.
|
|
37
|
+
|
|
38
|
+
Add the optional `logo` object only to override the displayed height:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
navigation:
|
|
42
|
+
label: Example Site
|
|
43
|
+
logo:
|
|
44
|
+
height: 2rem
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The width follows the logo's intrinsic aspect ratio. `navigation.logo` does not
|
|
48
|
+
enable the logo or select a file.
|
|
49
|
+
|
|
50
|
+
`norna config:check` fails when it finds multiple supported logo files, or when
|
|
51
|
+
`navigation.logo` is configured but no logo file exists. A site without a logo
|
|
52
|
+
uses its text label; the check reports this fallback as a warning.
|
|
53
|
+
|
|
54
|
+
## Logos And Favicons
|
|
55
|
+
|
|
56
|
+
A navigation logo is visible inside the website. A favicon identifies the site
|
|
57
|
+
in browser tabs, bookmarks, and similar browser UI. They are independent and
|
|
58
|
+
may coexist.
|
|
59
|
+
|
|
60
|
+
Norna recognizes these browser-icon filenames directly under `site/public/`:
|
|
61
|
+
|
|
62
|
+
- `favicon.svg`
|
|
63
|
+
- `favicon.ico`
|
|
64
|
+
- `favicon.png`
|
|
65
|
+
- `apple-touch-icon.png`
|
|
66
|
+
|
|
67
|
+
These filenames must also match exactly and use lowercase letters. More than
|
|
68
|
+
one format may be present. Norna emits links for every supported file and lets
|
|
69
|
+
the browser choose the appropriate one.
|
|
70
|
+
|
|
71
|
+
## Other Static Files
|
|
72
|
+
|
|
73
|
+
Other names are not restricted. For example:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
site/public/
|
|
77
|
+
|-- robots.txt
|
|
78
|
+
|-- CNAME
|
|
79
|
+
|-- verification.html
|
|
80
|
+
`-- downloads/
|
|
81
|
+
`-- project-overview.pdf
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Norna preserves subdirectories while copying these files. A source file such
|
|
85
|
+
as `site/public/downloads/project-overview.pdf` is published at
|
|
86
|
+
`/downloads/project-overview.pdf`, prefixed with the site's configured base path
|
|
87
|
+
when the site is published below a path such as `/repository-name/`.
|
|
88
|
+
|
|
89
|
+
Ordinary Markdown image syntax may reference a public asset with a root-relative
|
|
90
|
+
URL:
|
|
91
|
+
|
|
92
|
+
```md
|
|
93
|
+

|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use Norna image blocks instead for local editorial images that should be
|
|
97
|
+
validated, synced, processed, and captioned. See
|
|
98
|
+
[Images and Metadata](images-and-metadata.md).
|
|
99
|
+
|
|
100
|
+
## Generated Copy
|
|
101
|
+
|
|
102
|
+
`norna site:public` copies source files from `site/public/` to
|
|
103
|
+
`site/.norna/public/`. The latter directory is generated build-preparation
|
|
104
|
+
output and must not be edited or versioned.
|
|
105
|
+
|
package/docs/publishing.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Publishing
|
|
2
2
|
|
|
3
3
|
Norna includes a GitHub Pages workflow and deploy helpers. The public URL is
|
|
4
|
-
declared in `site/config.
|
|
4
|
+
declared in `site/config.yaml`; repository and default branch are discovered from
|
|
5
5
|
GitHub when a deploy command runs.
|
|
6
6
|
|
|
7
7
|
Do not run deploy commands from the engine repository unless you deliberately
|
|
@@ -15,7 +15,7 @@ Each site repository owns `.github/workflows/deploy.yml`. The starter workflow:
|
|
|
15
15
|
2. checks out the site repository,
|
|
16
16
|
3. sets up Node and image tools,
|
|
17
17
|
4. restores the generated image cache,
|
|
18
|
-
5. runs `npm ci` and `npm run build`,
|
|
18
|
+
5. runs `npm ci` and `npm run norna:build`,
|
|
19
19
|
6. uploads `dist/`,
|
|
20
20
|
7. deploys the artifact to GitHub Pages.
|
|
21
21
|
|
|
@@ -24,20 +24,16 @@ Site-specific public files such as `site/public/CNAME`, `robots.txt` and
|
|
|
24
24
|
`sitemap.xml` belong in the site repository.
|
|
25
25
|
|
|
26
26
|
For a project site without a custom domain, include the repository path in
|
|
27
|
-
`site/config.
|
|
27
|
+
`site/config.yaml`:
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
|
-
---
|
|
31
30
|
url: https://owner.github.io/repository-name/
|
|
32
|
-
---
|
|
33
31
|
```
|
|
34
32
|
|
|
35
33
|
For a custom domain or root-hosted site:
|
|
36
34
|
|
|
37
35
|
```yaml
|
|
38
|
-
---
|
|
39
36
|
url: https://example.com/
|
|
40
|
-
---
|
|
41
37
|
```
|
|
42
38
|
|
|
43
39
|
Norna derives the base path from the URL pathname and applies it to generated
|
|
@@ -98,7 +94,7 @@ npm run norna:deploy:watch -- --repo owner/name --branch main
|
|
|
98
94
|
|
|
99
95
|
The default poll interval is 10 seconds, timeout is 15 minutes and recent-run
|
|
100
96
|
limit is 10. `--workflow`, `--site-url` and `--limit` provide further one-run
|
|
101
|
-
overrides; these operational values do not belong in `config.
|
|
97
|
+
overrides; these operational values do not belong in `config.yaml`.
|
|
102
98
|
|
|
103
99
|
The monitor prints the run id, run URL, Actions URL, branch, commit SHA, status
|
|
104
100
|
and public site URL. On failures it fetches failed job details and a log
|
package/docs/routes.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
# Routes
|
|
2
2
|
|
|
3
3
|
`site/content.md` is the homepage and builds to `/`. Optional route pages live
|
|
4
|
-
under `site/routes/<NNN-route-id>/
|
|
4
|
+
under `site/routes/<NNN-route-id>/content.md` and build to first-level
|
|
5
5
|
URLs.
|
|
6
6
|
|
|
7
7
|
Routes use the same page frontmatter, optional section metadata, Norna-managed
|
|
8
|
-
|
|
8
|
+
Norna blocks, and Markdown section model as the homepage. See [Content](content.md)
|
|
9
9
|
for the page and section model.
|
|
10
10
|
|
|
11
11
|
Route directories can contain route content, route-local images, and
|
|
12
|
-
an optional route-local `theme.
|
|
12
|
+
an optional route-local `theme.yaml`. The route theme replaces the root visual
|
|
13
13
|
theme for that route and can select any complete top-level theme preset. Route
|
|
14
|
-
directories cannot contain technical
|
|
15
|
-
configuration
|
|
16
|
-
top-level `config.md`.
|
|
14
|
+
directories cannot contain `config.yaml` or `sitewide-content.yaml`; technical
|
|
15
|
+
configuration and shared identity remain at the selected site's top level.
|
|
17
16
|
|
|
18
17
|
## Route Directory Format
|
|
19
18
|
|
|
@@ -57,7 +56,7 @@ the route id `contact` and URL `/contact/`.
|
|
|
57
56
|
Add a first-level route by creating:
|
|
58
57
|
|
|
59
58
|
```text
|
|
60
|
-
site/routes/010-about/
|
|
59
|
+
site/routes/010-about/content.md
|
|
61
60
|
```
|
|
62
61
|
|
|
63
62
|
Minimal route page:
|