@janga/norna 0.7.2 → 0.7.3
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 +16 -16
- package/bin/norna-cli.mjs +12 -7
- package/docs/README.md +10 -11
- package/docs/commands.md +8 -8
- package/docs/configuration.md +13 -145
- package/docs/content.md +17 -15
- package/docs/design/command-organization.md +55 -55
- package/docs/design/site-examples-structure.md +2 -2
- package/docs/engine-development.md +5 -5
- package/docs/getting-started.md +19 -26
- package/docs/images-and-metadata.md +1 -1
- package/docs/local-development.md +2 -2
- package/docs/publishing.md +1 -1
- package/docs/routes.md +2 -2
- package/docs/site-structure.md +8 -7
- package/docs/theme.md +149 -7
- package/docs/typography.md +47 -28
- package/examples/dog-gallery/.astro/collections/site.schema.json +802 -0
- package/examples/dog-gallery/.astro/collections/theme.schema.json +714 -0
- package/examples/dog-gallery/.astro/content-assets.mjs +4 -0
- package/examples/dog-gallery/.astro/content-modules.mjs +1 -0
- package/examples/dog-gallery/.astro/content.d.ts +175 -0
- package/examples/dog-gallery/.astro/data-store.json +1 -0
- package/examples/dog-gallery/.astro/dev-local.json +8 -0
- package/examples/dog-gallery/.astro/dev.json +13 -0
- package/examples/dog-gallery/.astro/dev.log +49 -0
- package/examples/dog-gallery/.astro/settings.json +5 -0
- package/examples/dog-gallery/.astro/types.d.ts +2 -0
- package/examples/dog-gallery/dist/_astro/GalleryGrid.astro_astro_type_script_index_0_lang.B0kxDyGz.js +1 -0
- package/examples/dog-gallery/dist/_astro/SitePage.BFHZm5UG.css +1 -0
- package/examples/dog-gallery/dist/dog-care/index.html +15 -0
- package/examples/dog-gallery/dist/favicon.svg +7 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1536.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-960.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-3939.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-2400.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1600.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-2576.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-1277.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1536.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-768.webp +0 -0
- package/examples/dog-gallery/dist/index.html +43 -0
- package/examples/dog-gallery/dist/robots.txt +2 -0
- package/examples/dog-gallery/node_modules/.vite/deps/_metadata.json +74 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro-D_GIpJIE.js +434 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro-D_GIpJIE.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_axobject-query.js +2702 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/audit-DM9Hkl5B.js +1534 -0
- package/examples/dog-gallery/node_modules/.vite/deps/audit-DM9Hkl5B.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/highlight-DnZ1ULOL.js +48 -0
- package/examples/dog-gallery/node_modules/.vite/deps/highlight-DnZ1ULOL.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/icons-RyebKi45.js +42 -0
- package/examples/dog-gallery/node_modules/.vite/deps/icons-RyebKi45.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/package.json +3 -0
- package/examples/dog-gallery/node_modules/.vite/deps/rolldown-runtime-BvCyGRYZ.js +4 -0
- package/examples/dog-gallery/node_modules/.vite/deps/settings-DaU-gNnK.js +190 -0
- package/examples/dog-gallery/node_modules/.vite/deps/settings-DaU-gNnK.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/toolbar-63PA619H.js +458 -0
- package/examples/dog-gallery/node_modules/.vite/deps/toolbar-63PA619H.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/ui-library--bkcNSYz.js +1016 -0
- package/examples/dog-gallery/node_modules/.vite/deps/ui-library--bkcNSYz.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/window-jPkpKVcy.js +32 -0
- package/examples/dog-gallery/node_modules/.vite/deps/window-jPkpKVcy.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/xray-BXCHpEJP.js +111 -0
- package/examples/dog-gallery/node_modules/.vite/deps/xray-BXCHpEJP.js.map +1 -0
- package/examples/dog-gallery/site/config.mjs +12 -42
- package/examples/dog-gallery/site/content.md +27 -5
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +17 -3
- package/examples/dog-gallery/site/theme.md +85 -26
- package/fixtures/basic/site/config.mjs +2 -22
- package/fixtures/basic/site/content.md +1 -1
- package/fixtures/basic/site/theme.md +7 -3
- package/package.json +3 -3
- package/scripts/check-config.mjs +3 -3
- package/scripts/deploy-site.mjs +3 -3
- package/scripts/init-site.mjs +10 -8
- package/scripts/lib/frontmatter-yaml.mjs +85 -0
- package/scripts/lib/presentation.mjs +10 -11
- package/scripts/lib/project-config.mjs +91 -45
- package/scripts/lib/site-content.mjs +20 -2
- package/scripts/lib/theme-config.mjs +34 -0
- package/scripts/lib/typography.mjs +100 -20
- package/scripts/show-typography.mjs +58 -154
- package/scripts/sync-content-sections.mjs +6 -6
- package/scripts/test-content-check.mjs +3 -4
- package/scripts/test-engine-commands.mjs +2 -2
- package/scripts/test-package-check.mjs +17 -16
- package/scripts/test-temporary-visibility.mjs +2 -3
- package/src/components/SitePage.astro +2 -3
- package/src/components/SiteSection.astro +39 -5
- package/src/content.config.ts +60 -2
- package/src/layouts/BaseLayout.astro +17 -0
- package/src/styles/global.css +54 -50
- package/starters/basic/README.md +10 -15
- package/starters/basic/package.json +2 -2
- package/starters/basic/site/config.mjs +3 -24
- package/starters/basic/site/content.md +40 -7
- package/starters/basic/site/theme.md +110 -17
- package/starters/project/.github/workflows/deploy.yml +65 -0
- package/starters/project/README.md +72 -0
- package/starters/project/package-lock.json +4296 -0
- package/starters/project/package.json +35 -0
- package/starters/project/site/config.mjs +43 -0
- package/starters/project/site/content.md +88 -0
- package/starters/project/site/public/robots.txt +2 -0
- package/starters/project/site/routes/guide/route-content.md +58 -0
- package/starters/project/site/theme.md +15 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Command Organization
|
|
2
2
|
|
|
3
|
-
This document defines the naming principles for commands in `norna`,
|
|
4
|
-
|
|
3
|
+
This document defines the naming principles for commands in `norna`, site
|
|
4
|
+
repositories, and GitHub projects that embed a Norna site.
|
|
5
5
|
|
|
6
6
|
The goal is that command names reveal both the action and the scope they affect.
|
|
7
|
-
This matters because the same repository can contain a
|
|
7
|
+
This matters because the same repository can contain a Norna site, an app, tests,
|
|
8
8
|
and a publishing workflow that should not accidentally share ambiguous command
|
|
9
9
|
names.
|
|
10
10
|
|
|
@@ -12,10 +12,10 @@ names.
|
|
|
12
12
|
|
|
13
13
|
`norna` commands must be understandable in three situations:
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- Standalone site project: the repository exists only to publish one
|
|
16
16
|
`norna` site.
|
|
17
|
-
- Mixed
|
|
18
|
-
|
|
17
|
+
- Mixed project: the repository contains another project, such as an app or
|
|
18
|
+
library, and includes a Norna site as one part of its
|
|
19
19
|
GitHub Pages output.
|
|
20
20
|
- Engine development: the repository is `norna` itself.
|
|
21
21
|
|
|
@@ -27,7 +27,7 @@ Use these namespaces consistently.
|
|
|
27
27
|
|
|
28
28
|
Use `norna:*` npm scripts in repositories that consume `norna`.
|
|
29
29
|
|
|
30
|
-
These scripts operate on a selected
|
|
30
|
+
These scripts operate on a selected site source directory. In a standalone site
|
|
31
31
|
project that directory is normally `site/`. In a mixed project it may be a more
|
|
32
32
|
specific directory such as `presentation/`, with the script setting
|
|
33
33
|
`NORNA_SITE_DIR` or passing `norna --site-dir`.
|
|
@@ -41,19 +41,19 @@ npm run norna:sync
|
|
|
41
41
|
npm run norna:build
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Mixed projects must use `norna:*` for
|
|
44
|
+
Mixed projects must use `norna:*` for Norna work so names such as `build`,
|
|
45
45
|
`test`, and `deploy` can remain under the containing project's control.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Standalone site projects should also use `norna:*` as the primary documented
|
|
48
48
|
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
|
-
### Project Commands That Call
|
|
52
|
+
### Project Commands That Call Norna Commands
|
|
53
53
|
|
|
54
54
|
`norna` does not define a consuming project's unprefixed commands. Names
|
|
55
55
|
such as `build`, `test`, and `deploy` belong to the project that consumes the
|
|
56
|
-
|
|
56
|
+
Norna engine.
|
|
57
57
|
|
|
58
58
|
Examples:
|
|
59
59
|
|
|
@@ -63,18 +63,18 @@ npm run test
|
|
|
63
63
|
npm run deploy
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
When those project commands need the
|
|
66
|
+
When those project commands need the Norna site, they should call `norna:*`
|
|
67
67
|
scripts instead of calling `norna` directly. That keeps the selected
|
|
68
|
-
|
|
68
|
+
site source directory and other project-specific wrapper behavior in one
|
|
69
69
|
place.
|
|
70
70
|
|
|
71
71
|
In a mixed project, if `npm run build` exists, it should build the project's
|
|
72
|
-
complete publishable artifact, not only the
|
|
73
|
-
GitHub Pages artifact containing both a
|
|
72
|
+
complete publishable artifact, not only the Norna site. If the project publishes a
|
|
73
|
+
GitHub Pages artifact containing both a Norna site and an app, `build` should
|
|
74
74
|
produce that full artifact and may call `npm run norna:build` internally.
|
|
75
75
|
|
|
76
|
-
In a
|
|
77
|
-
commands because the
|
|
76
|
+
In a standalone site project, project commands may be aliases to `norna:*`
|
|
77
|
+
commands because the Norna site is the whole project.
|
|
78
78
|
|
|
79
79
|
### `release:*`
|
|
80
80
|
|
|
@@ -114,19 +114,19 @@ can set the correct site directory for the repository.
|
|
|
114
114
|
|
|
115
115
|
## Functional Groups
|
|
116
116
|
|
|
117
|
-
### Install
|
|
117
|
+
### Install Norna Software
|
|
118
118
|
|
|
119
|
-
Creating a new
|
|
119
|
+
Creating a new standalone site project starts outside the target project because
|
|
120
120
|
the target does not have a `package.json` yet:
|
|
121
121
|
|
|
122
122
|
```sh
|
|
123
|
-
npx @janga/norna@latest init my-
|
|
124
|
-
cd my-
|
|
123
|
+
npx @janga/norna@latest init my-site
|
|
124
|
+
cd my-site
|
|
125
125
|
npm install
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
A mixed project already has its own repository and may have its own
|
|
129
|
-
`package.json`. In that situation the
|
|
129
|
+
`package.json`. In that situation the Norna dependency should be installed as
|
|
130
130
|
part of the existing project setup:
|
|
131
131
|
|
|
132
132
|
```sh
|
|
@@ -134,7 +134,7 @@ npm install --save-exact @janga/norna
|
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
The mixed project should then add `norna:*` scripts that point at the chosen
|
|
137
|
-
|
|
137
|
+
site source directory.
|
|
138
138
|
|
|
139
139
|
Engine development uses ordinary package installation in the engine repository:
|
|
140
140
|
|
|
@@ -142,9 +142,9 @@ Engine development uses ordinary package installation in the engine repository:
|
|
|
142
142
|
npm install
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
### Upgrade Or Inspect
|
|
145
|
+
### Upgrade Or Inspect Norna Software
|
|
146
146
|
|
|
147
|
-
In a consuming repository, upgrading or inspecting the installed
|
|
147
|
+
In a consuming repository, upgrading or inspecting the installed Norna engine
|
|
148
148
|
is norna maintenance, so the preferred namespace is `norna:*`:
|
|
149
149
|
|
|
150
150
|
```sh
|
|
@@ -162,13 +162,13 @@ In the engine repository, version changes belong to `release:*`:
|
|
|
162
162
|
npm run release:minor
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
### Initialize A
|
|
165
|
+
### Initialize A Site Project Directory
|
|
166
166
|
|
|
167
167
|
Initialization is a direct CLI operation because it usually happens before a
|
|
168
168
|
project has npm scripts:
|
|
169
169
|
|
|
170
170
|
```sh
|
|
171
|
-
npx @janga/norna@latest init my-
|
|
171
|
+
npx @janga/norna@latest init my-site
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
The initializer should support two setup modes that share the same `norna:*`
|
|
@@ -176,25 +176,25 @@ command vocabulary.
|
|
|
176
176
|
|
|
177
177
|
#### Pure Setup
|
|
178
178
|
|
|
179
|
-
Pure setup creates a new project where the
|
|
179
|
+
Pure setup creates a new project where the Norna site is the whole repository:
|
|
180
180
|
|
|
181
181
|
```sh
|
|
182
|
-
npx @janga/norna@latest init my-
|
|
182
|
+
npx @janga/norna@latest init my-site --type pure
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
This should be the default when the target is a new or empty directory.
|
|
186
186
|
|
|
187
187
|
Pure setup should create:
|
|
188
188
|
|
|
189
|
-
- a normal
|
|
189
|
+
- a normal site source directory, normally `site/`;
|
|
190
190
|
- a `package.json` with `norna:*` scripts;
|
|
191
191
|
- unprefixed convenience aliases only when they mean the same thing as the
|
|
192
192
|
whole project, for example `build` as an alias for `norna:build`;
|
|
193
|
-
- the standard GitHub Pages workflow for publishing the
|
|
193
|
+
- the standard GitHub Pages workflow for publishing the site.
|
|
194
194
|
|
|
195
195
|
#### Embedded Setup
|
|
196
196
|
|
|
197
|
-
Embedded setup adds a
|
|
197
|
+
Embedded setup adds a Norna site to an existing project without taking ownership
|
|
198
198
|
of that project's root commands:
|
|
199
199
|
|
|
200
200
|
```sh
|
|
@@ -204,9 +204,9 @@ npx @janga/norna@latest init . --type embedded --site-dir presentation
|
|
|
204
204
|
Embedded setup should be selected explicitly, or suggested when the target
|
|
205
205
|
already contains a `package.json`.
|
|
206
206
|
|
|
207
|
-
Embedded setup should create or update only the
|
|
207
|
+
Embedded setup should create or update only the Norna-owned parts:
|
|
208
208
|
|
|
209
|
-
- the chosen
|
|
209
|
+
- the chosen site source directory, for example `presentation/`;
|
|
210
210
|
- `@janga/norna` as a project dependency;
|
|
211
211
|
- `norna:*` scripts that set the selected site directory;
|
|
212
212
|
- no unprefixed aliases such as `build`, `test`, `dev`, or `deploy`;
|
|
@@ -263,11 +263,11 @@ npm run test
|
|
|
263
263
|
|
|
264
264
|
If a mixed project defines `test`, that command should cover the whole project.
|
|
265
265
|
It may call `norna:check`, but it should not be a hidden synonym for only
|
|
266
|
-
|
|
266
|
+
Norna validation.
|
|
267
267
|
|
|
268
|
-
### Inspect
|
|
268
|
+
### Inspect Site Presentation
|
|
269
269
|
|
|
270
|
-
Commands that inspect
|
|
270
|
+
Commands that inspect site presentation without changing source files use
|
|
271
271
|
`norna:*` in consuming repositories:
|
|
272
272
|
|
|
273
273
|
```sh
|
|
@@ -277,11 +277,11 @@ npm run norna:typography:show
|
|
|
277
277
|
|
|
278
278
|
`norna:typography:presets` shows the built-in typography presets from the
|
|
279
279
|
installed engine. `norna:typography:show` shows the effective typography for
|
|
280
|
-
the selected
|
|
280
|
+
the selected site after presets and overrides have been applied.
|
|
281
281
|
|
|
282
282
|
### Correct Content And Configuration
|
|
283
283
|
|
|
284
|
-
Commands that modify
|
|
284
|
+
Commands that modify Norna-owned source files use `norna:*`:
|
|
285
285
|
|
|
286
286
|
```sh
|
|
287
287
|
npm run norna:sync
|
|
@@ -293,7 +293,7 @@ npm run norna:images
|
|
|
293
293
|
Messages emitted by the engine should mention the direct CLI command and the
|
|
294
294
|
starter-style npm wrapper when suggesting a fix.
|
|
295
295
|
|
|
296
|
-
Configuration edits are normally manual edits to the selected
|
|
296
|
+
Configuration edits are normally manual edits to the selected site
|
|
297
297
|
`config.mjs`, followed by:
|
|
298
298
|
|
|
299
299
|
```sh
|
|
@@ -302,7 +302,7 @@ npm run norna:config:check
|
|
|
302
302
|
|
|
303
303
|
### Build
|
|
304
304
|
|
|
305
|
-
In a
|
|
305
|
+
In a standalone site project:
|
|
306
306
|
|
|
307
307
|
```sh
|
|
308
308
|
npm run norna:build
|
|
@@ -311,7 +311,7 @@ npm run build
|
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
`norna:build:local` builds and restarts the local dev server. `build` may
|
|
314
|
-
alias `norna:build` because the
|
|
314
|
+
alias `norna:build` because the Norna site is the whole project.
|
|
315
315
|
|
|
316
316
|
In a mixed project:
|
|
317
317
|
|
|
@@ -321,10 +321,10 @@ npm run norna:build:local
|
|
|
321
321
|
npm run build
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
`norna:build` builds only the
|
|
325
|
-
|
|
324
|
+
`norna:build` builds only the Norna site. `norna:build:local` builds the
|
|
325
|
+
site and restarts the local Norna dev server. If the mixed project defines
|
|
326
326
|
`build`, that project command should build the complete publishable artifact,
|
|
327
|
-
such as a GitHub Pages output that combines the
|
|
327
|
+
such as a GitHub Pages output that combines the Norna site with an app. It may call
|
|
328
328
|
`norna:build` internally.
|
|
329
329
|
|
|
330
330
|
In the engine repository:
|
|
@@ -347,8 +347,8 @@ npm run norna:deploy
|
|
|
347
347
|
npm run norna:deploy:commit
|
|
348
348
|
```
|
|
349
349
|
|
|
350
|
-
Use these only when the
|
|
351
|
-
project deliberately delegates deployment to the
|
|
350
|
+
Use these only when the Norna site is the deployable site or when the containing
|
|
351
|
+
project deliberately delegates deployment to the Norna engine.
|
|
352
352
|
|
|
353
353
|
Mixed projects may instead have project-owned deploy commands:
|
|
354
354
|
|
|
@@ -357,7 +357,7 @@ npm run deploy
|
|
|
357
357
|
```
|
|
358
358
|
|
|
359
359
|
Those commands should publish the complete project artifact. If they need the
|
|
360
|
-
|
|
360
|
+
Norna site, they should call `norna:*` scripts internally.
|
|
361
361
|
|
|
362
362
|
Engine publishing uses `release:*`, not `norna:*`:
|
|
363
363
|
|
|
@@ -369,14 +369,14 @@ npm run release:major
|
|
|
369
369
|
|
|
370
370
|
### Monitor Publishing
|
|
371
371
|
|
|
372
|
-
|
|
372
|
+
GitHub Pages monitoring for a Norna site belongs under:
|
|
373
373
|
|
|
374
374
|
```sh
|
|
375
375
|
npm run norna:deploy:watch
|
|
376
376
|
```
|
|
377
377
|
|
|
378
378
|
Mixed projects may provide a project-owned monitoring command when monitoring
|
|
379
|
-
is not specific to the
|
|
379
|
+
is not specific to the Norna site:
|
|
380
380
|
|
|
381
381
|
```sh
|
|
382
382
|
npm run deploy:watch
|
|
@@ -388,19 +388,19 @@ norna-specific deploy settings, it should call `norna:deploy:watch`.
|
|
|
388
388
|
## Naming Rules
|
|
389
389
|
|
|
390
390
|
- Use `norna:*` for every npm script in a consuming repository whose direct
|
|
391
|
-
object is the
|
|
391
|
+
object is the Norna site, its source files, its generated images, its dev server,
|
|
392
392
|
or its engine dependency.
|
|
393
393
|
- `norna` does not define unprefixed project commands such as `build`,
|
|
394
394
|
`test`, and `deploy` in consuming repositories.
|
|
395
|
-
- If project commands need
|
|
395
|
+
- If project commands need Norna behavior, they should call `norna:*`
|
|
396
396
|
scripts.
|
|
397
|
-
- In
|
|
397
|
+
- In standalone site projects, unprefixed project commands may alias `norna:*`
|
|
398
398
|
commands.
|
|
399
399
|
- In mixed projects, unprefixed project commands must not be aliases for only
|
|
400
|
-
the
|
|
400
|
+
the Norna site unless the command name makes that scope explicit.
|
|
401
401
|
- Use `release:*` only for publishing the reusable engine package.
|
|
402
402
|
- Prefer direct `norna ...` commands in engine docs and diagnostics;
|
|
403
403
|
prefer npm scripts in site-repository docs.
|
|
404
404
|
- Do not create separate namespaces for every internal concept. If a command is
|
|
405
|
-
about maintaining the
|
|
405
|
+
about maintaining the Norna dependency in a consuming repository, keep it
|
|
406
406
|
under `norna:*`.
|
|
@@ -70,8 +70,8 @@ they demonstrate a distinct feature or workflow.
|
|
|
70
70
|
|
|
71
71
|
- `dog-gallery/`: current local visual demo, manual inspection site, and
|
|
72
72
|
navigation diagnostic target.
|
|
73
|
-
- `routes-demo/`: focused route/navigation example if dog
|
|
74
|
-
broad.
|
|
73
|
+
- `routes-demo/`: focused route/navigation example if the dog example becomes
|
|
74
|
+
too broad.
|
|
75
75
|
- `typography-demo/`: focused typography preset and override example if needed.
|
|
76
76
|
|
|
77
77
|
The repository-local `site/` directory is reserved for the documentation site.
|
|
@@ -14,13 +14,13 @@ This document is for work on the reusable `norna` package itself.
|
|
|
14
14
|
- `scripts/deploy-site.mjs`: deploy and deploy:commit behavior.
|
|
15
15
|
- `scripts/watch-pages-deploy.mjs`: GitHub Pages workflow monitor.
|
|
16
16
|
- `src/content.config.ts`: Astro content schema.
|
|
17
|
-
- `src/components/` and `src/layouts/`: rendered page, navigation,
|
|
18
|
-
layout.
|
|
17
|
+
- `src/components/` and `src/layouts/`: rendered page, navigation, image rows,
|
|
18
|
+
and layout.
|
|
19
19
|
- `tests/`: Playwright navigation diagnostics.
|
|
20
20
|
- `fixtures/basic/site/`: minimal site used for engine checks.
|
|
21
21
|
- `starters/basic/`: copyable site starter.
|
|
22
|
-
- `examples/dog-gallery/site/`: visual dog
|
|
23
|
-
|
|
22
|
+
- `examples/dog-gallery/site/`: visual dog example used by demo builds and
|
|
23
|
+
navigation diagnostics.
|
|
24
24
|
|
|
25
25
|
The repository-local `site/` directory is reserved for a local documentation
|
|
26
26
|
site. It is useful for dogfooding `norna` documentation, but it is not the
|
|
@@ -48,7 +48,7 @@ npm run dev:local
|
|
|
48
48
|
npm run build
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
The dog
|
|
51
|
+
The dog example remains the visual demo and navigation diagnostic target:
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
54
|
cd examples/dog-gallery/site
|
package/docs/getting-started.md
CHANGED
|
@@ -23,10 +23,10 @@ new site directory:
|
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
25
|
cd path/to/your/projects
|
|
26
|
-
npx @janga/norna@latest init my-
|
|
27
|
-
cd my-
|
|
26
|
+
npx @janga/norna@latest init my-site
|
|
27
|
+
cd my-site
|
|
28
28
|
npm install
|
|
29
|
-
npm run
|
|
29
|
+
npm run dev
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
After `npm install`, the project's npm scripts use the project-local `norna`
|
|
@@ -45,7 +45,7 @@ engine repository. For example:
|
|
|
45
45
|
```text
|
|
46
46
|
Projects/
|
|
47
47
|
norna/
|
|
48
|
-
my-
|
|
48
|
+
my-site/
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
The starter contains:
|
|
@@ -62,12 +62,13 @@ Commit the generated `package-lock.json` after the first install.
|
|
|
62
62
|
|
|
63
63
|
## First Edits
|
|
64
64
|
|
|
65
|
-
1. Edit `site/config.mjs` for the site's URL,
|
|
66
|
-
|
|
67
|
-
2. Edit `site/theme.md` for site-wide
|
|
68
|
-
and frame colors, or omit it
|
|
65
|
+
1. Edit `site/config.mjs` for the site's URL, language labels, GitHub
|
|
66
|
+
repository, footer, and deploy settings.
|
|
67
|
+
2. Edit `site/theme.md` for site-wide layout, vertical spacing, image sizing,
|
|
68
|
+
font, typography preset, colors, inline styles, and frame colors, or omit it
|
|
69
|
+
to use engine defaults.
|
|
69
70
|
3. Edit `site/content.md` for homepage title, description, sections, text,
|
|
70
|
-
|
|
71
|
+
image rows, page/section presentation overrides, alt text, and captions.
|
|
71
72
|
4. Put source images under `site/images/<section-id>/`.
|
|
72
73
|
5. Add optional route pages under
|
|
73
74
|
`site/routes/<route-folder>/route-content.md`.
|
|
@@ -113,20 +114,12 @@ Read [Site Structure](site-structure.md), [Content](content.md),
|
|
|
113
114
|
[Theme](theme.md), [Typography](typography.md), [Routes](routes.md), and
|
|
114
115
|
[Configuration](configuration.md) before publishing a real site.
|
|
115
116
|
|
|
116
|
-
To change the site's maximum page width,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
accepted format and default value.
|
|
126
|
-
|
|
127
|
-
To change the site-wide typography preset, edit `site/theme.md`. To change one
|
|
128
|
-
page or section, add a focused `presentation.typography` override in
|
|
129
|
-
`site/content.md`. See [Typography](typography.md). Use
|
|
130
|
-
`npm run norna:typography:presets` to inspect the installed preset values and
|
|
131
|
-
`npm run norna:typography:show` to inspect the resolved typography for the
|
|
132
|
-
selected site.
|
|
117
|
+
To change the site's maximum page width, side gutters, vertical spacing, image
|
|
118
|
+
width, image height limits, font, colors, or site-wide typography preset, edit
|
|
119
|
+
`site/theme.md`. See [Theme](theme.md) for the accepted shape.
|
|
120
|
+
|
|
121
|
+
To change one page or section, add a focused `presentation.typography`
|
|
122
|
+
override in `site/content.md`. See [Typography](typography.md). Use
|
|
123
|
+
`norna typography presets` to inspect the installed preset values and
|
|
124
|
+
`norna typography show` to inspect the resolved typography for the selected
|
|
125
|
+
site.
|
|
@@ -15,7 +15,7 @@ Supported source extensions:
|
|
|
15
15
|
- `.png`
|
|
16
16
|
|
|
17
17
|
Image filenames must be globally unique under `site/images/`. The content and
|
|
18
|
-
image scripts reject duplicate filenames because
|
|
18
|
+
image scripts reject duplicate filenames because image rows identify images by
|
|
19
19
|
filename only.
|
|
20
20
|
|
|
21
21
|
## Generated Variants
|
|
@@ -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
|
|
8
|
+
npm run dev
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The wrapper:
|
|
@@ -28,7 +28,7 @@ To stop any process that is blocking the standard port before starting, pass
|
|
|
28
28
|
`--kill`:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
npm run
|
|
31
|
+
npm run dev -- --kill
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
For the pure starter's `dev` alias, use:
|
package/docs/publishing.md
CHANGED
|
@@ -79,7 +79,7 @@ npm run norna:deploy:commit -- "Commit message"
|
|
|
79
79
|
|
|
80
80
|
It builds, stages only allowed site changes, commits, pushes, and checks Pages.
|
|
81
81
|
The allowlist is implemented in `scripts/deploy-site.mjs` and includes the
|
|
82
|
-
site content file, selected config/static files, expected
|
|
82
|
+
site content file, selected config/static files, expected generated images,
|
|
83
83
|
generated image manifest, package files, `tsconfig.json`, `astro.config.mjs`,
|
|
84
84
|
and `src/` changes.
|
|
85
85
|
|
package/docs/routes.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
under `site/routes/<route-folder>/route-content.md` and build to first-level
|
|
5
5
|
URLs.
|
|
6
6
|
|
|
7
|
-
Routes use the same page frontmatter, section frontmatter,
|
|
7
|
+
Routes use the same page frontmatter, section frontmatter, image rows, and
|
|
8
8
|
Markdown section model as the homepage. See [Content](content.md) for the page
|
|
9
9
|
and section model.
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ Minimal route page:
|
|
|
21
21
|
```md
|
|
22
22
|
---
|
|
23
23
|
title: About
|
|
24
|
-
description: About this
|
|
24
|
+
description: About this site.
|
|
25
25
|
navigation:
|
|
26
26
|
label: About
|
|
27
27
|
order: 20
|
package/docs/site-structure.md
CHANGED
|
@@ -30,18 +30,19 @@ site directory. Without an explicit site directory, commands first accept the
|
|
|
30
30
|
current directory when it contains both `config.mjs` and `content.md`.
|
|
31
31
|
Otherwise, commands started from a subdirectory walk upward until they find the
|
|
32
32
|
default `site/` directory containing those files.
|
|
33
|
-
`theme.md` is optional; omit it to use the engine's built-in
|
|
34
|
-
defaults.
|
|
33
|
+
`theme.md` is optional; omit it to use the engine's built-in visual defaults.
|
|
35
34
|
|
|
36
35
|
## Versioned Source Files
|
|
37
36
|
|
|
38
37
|
Version these files in a site repository:
|
|
39
38
|
|
|
40
39
|
- `site/config.mjs`: technical site configuration.
|
|
41
|
-
- `site/theme.md`: optional site-wide visual theme,
|
|
42
|
-
|
|
40
|
+
- `site/theme.md`: optional site-wide visual theme, including layout, spacing,
|
|
41
|
+
image sizing, font, typography defaults, colors, inline styles, and frame
|
|
42
|
+
colors.
|
|
43
|
+
See [Theme](theme.md).
|
|
43
44
|
- `site/content.md`: homepage page file with editable content, section
|
|
44
|
-
definitions,
|
|
45
|
+
definitions, image rows, alt text, and captions. See [Content](content.md).
|
|
45
46
|
- `site/images/<section-id>/`: original source images.
|
|
46
47
|
- `site/routes/<route-folder>/route-content.md`: optional route page files.
|
|
47
48
|
See [Routes](routes.md).
|
|
@@ -83,6 +84,6 @@ In this repository:
|
|
|
83
84
|
- `starters/basic/` is copied by `norna init <target-dir>` to create a
|
|
84
85
|
site repository.
|
|
85
86
|
- `fixtures/basic/site/` is used by engine regression tests.
|
|
86
|
-
- `examples/dog-gallery/site/` is the local visual dog
|
|
87
|
-
|
|
87
|
+
- `examples/dog-gallery/site/` is the local visual dog example used by demo
|
|
88
|
+
builds and navigation diagnostics.
|
|
88
89
|
- `site/` is reserved for the local documentation site.
|