@janga/norna 0.7.1 → 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 +32 -18
- package/astro.config.mjs +2 -0
- package/bin/norna-cli.mjs +175 -0
- package/bin/norna.mjs +149 -150
- package/docs/README.md +41 -22
- package/docs/commands.md +25 -12
- package/docs/configuration.md +38 -135
- package/docs/content.md +108 -265
- package/docs/{command-organization.md → design/command-organization.md} +64 -60
- package/docs/{site-examples-structure-note.md → design/site-examples-structure.md} +19 -24
- package/docs/engine-development.md +35 -7
- package/docs/getting-started.md +55 -26
- package/docs/images-and-metadata.md +1 -1
- package/docs/local-development.md +14 -1
- package/docs/publishing.md +24 -1
- package/docs/routes.md +90 -0
- package/docs/site-structure.md +18 -10
- package/docs/theme.md +292 -0
- package/docs/typography.md +144 -0
- 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/.norna/generated-images.json +226 -0
- package/examples/dog-gallery/site/config.mjs +67 -0
- package/examples/dog-gallery/site/content.md +168 -0
- package/examples/dog-gallery/site/images/black-dogs/black-puppy-meadow.png +0 -0
- package/examples/dog-gallery/site/images/black-dogs/photo-of-a-black-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/brown-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/dog-accompanies-master.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/golden-retriever.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/toller-puppy.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-cute-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-puppy-garden.png +0 -0
- package/examples/dog-gallery/site/public/favicon.svg +7 -0
- package/examples/dog-gallery/site/public/robots.txt +2 -0
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +49 -0
- package/examples/dog-gallery/site/theme.md +114 -0
- package/fixtures/basic/site/config.mjs +3 -22
- package/fixtures/basic/site/content.md +1 -1
- package/fixtures/basic/site/theme.md +7 -3
- package/package.json +10 -9
- package/scripts/check-config.mjs +4 -3
- package/scripts/deploy-site.mjs +3 -3
- package/scripts/dev-local.mjs +64 -15
- package/scripts/init-site.mjs +11 -9
- package/scripts/lib/frontmatter-yaml.mjs +85 -0
- package/scripts/lib/presentation.mjs +10 -11
- package/scripts/lib/project-config.mjs +113 -45
- package/scripts/lib/site-content.mjs +21 -2
- package/scripts/lib/site-paths.mjs +18 -3
- package/scripts/lib/theme-config.mjs +34 -0
- package/scripts/lib/typography.mjs +103 -23
- package/scripts/show-typography.mjs +202 -75
- package/scripts/sync-content-sections.mjs +6 -6
- package/scripts/test-cli-discovery.mjs +124 -0
- package/scripts/test-content-check.mjs +3 -4
- package/scripts/test-engine-commands.mjs +20 -6
- package/scripts/test-navigation.mjs +10 -6
- package/scripts/test-package-check.mjs +40 -11
- package/scripts/test-temporary-visibility.mjs +2 -3
- package/src/components/SiteNavigation.astro +7 -5
- package/src/components/SitePage.astro +5 -3
- package/src/components/SiteSection.astro +63 -29
- package/src/content.config.ts +64 -2
- package/src/layouts/BaseLayout.astro +19 -1
- package/src/lib/basePath.ts +21 -0
- package/src/lib/generatedImages.ts +8 -4
- package/src/lib/sectionContent.ts +6 -1
- package/src/lib/sitePublicAssets.ts +8 -1
- package/src/styles/global.css +59 -55
- package/starters/basic/.github/workflows/deploy.yml +3 -3
- package/starters/basic/README.md +30 -14
- package/starters/basic/package.json +3 -3
- package/starters/basic/site/config.mjs +4 -24
- package/starters/basic/site/content.md +44 -9
- package/starters/basic/site/theme.md +113 -16
- 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
package/docs/README.md
CHANGED
|
@@ -9,40 +9,59 @@ For a site maintainer:
|
|
|
9
9
|
|
|
10
10
|
1. [Getting Started](getting-started.md)
|
|
11
11
|
2. [Site Structure](site-structure.md)
|
|
12
|
-
3. [
|
|
13
|
-
4. [
|
|
14
|
-
5. [
|
|
15
|
-
6. [
|
|
16
|
-
7. [
|
|
12
|
+
3. [Theme](theme.md)
|
|
13
|
+
4. [Configuration](configuration.md)
|
|
14
|
+
5. [Content](content.md)
|
|
15
|
+
6. [Typography](typography.md)
|
|
16
|
+
7. [Routes](routes.md)
|
|
17
|
+
8. [Images And Metadata](images-and-metadata.md)
|
|
18
|
+
9. [Local Development](local-development.md)
|
|
19
|
+
10. [Publishing](publishing.md)
|
|
17
20
|
|
|
18
21
|
For a developer integrating or updating the engine:
|
|
19
22
|
|
|
20
23
|
1. [Commands](commands.md)
|
|
21
|
-
2. [
|
|
22
|
-
3. [
|
|
23
|
-
4. [
|
|
24
|
-
5. [
|
|
25
|
-
6. [
|
|
24
|
+
2. [Configuration](configuration.md)
|
|
25
|
+
3. [Content](content.md)
|
|
26
|
+
4. [Theme](theme.md)
|
|
27
|
+
5. [Typography](typography.md)
|
|
28
|
+
6. [Routes](routes.md)
|
|
29
|
+
7. [Engine Development](engine-development.md)
|
|
30
|
+
|
|
31
|
+
For design and naming principles:
|
|
32
|
+
|
|
33
|
+
1. [Command Organization](design/command-organization.md)
|
|
34
|
+
2. [Site Examples Structure](design/site-examples-structure.md)
|
|
26
35
|
|
|
27
36
|
For a quick reference:
|
|
28
37
|
|
|
29
|
-
- [Configuration](configuration.md) describes
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
- [Configuration](configuration.md) describes technical `site/config.mjs`
|
|
39
|
+
fields such as URL, base path, locale labels, footer, GitHub, and deploy
|
|
40
|
+
settings.
|
|
41
|
+
- [Content](content.md) describes page frontmatter, section frontmatter,
|
|
42
|
+
image rows, carousels, temporary sections, Markdown section matching, and
|
|
43
|
+
content validation.
|
|
44
|
+
- [Theme](theme.md) describes site-wide layout, spacing, image sizing, font,
|
|
45
|
+
typography, presentation colors, frame colors, and inline styles.
|
|
46
|
+
- [Typography](typography.md) describes presets, roles, overrides,
|
|
47
|
+
inheritance, and inspection commands.
|
|
48
|
+
- [Routes](routes.md) describes route files, slugs, route navigation, and
|
|
49
|
+
route image directories.
|
|
36
50
|
- [Commands](commands.md) lists the public CLI surface and starter npm scripts.
|
|
37
|
-
- [Command Organization](command-organization.md) defines command namespaces
|
|
38
|
-
for pure gallery projects, mixed projects, and engine development.
|
|
39
51
|
- [Site Structure](site-structure.md) separates versioned source files from
|
|
40
52
|
generated build output.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
|
|
54
|
+
Design documents are intentionally separate from the user reference:
|
|
55
|
+
|
|
56
|
+
- [Command Organization](design/command-organization.md) defines command
|
|
57
|
+
namespaces for standalone sites, mixed projects, and engine development.
|
|
58
|
+
- [Site Examples Structure](design/site-examples-structure.md) defines the
|
|
59
|
+
intended vocabulary for starters, examples, documentation sites, reference
|
|
60
|
+
docs, and fixtures.
|
|
44
61
|
|
|
45
62
|
Site repositories should document only their site-specific choices and link here
|
|
46
63
|
for generic `norna` behavior.
|
|
47
64
|
|
|
65
|
+
`norna` is licensed under [GNU GPL v3](../LICENSE).
|
|
66
|
+
|
|
48
67
|
Planning and future work are tracked in [../BACKLOG.md](../BACKLOG.md).
|
package/docs/commands.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# Commands
|
|
2
2
|
|
|
3
|
-
The `norna` binary is the stable command surface.
|
|
4
|
-
scripts
|
|
3
|
+
The `norna` binary is the stable command surface. Site repositories normally
|
|
4
|
+
use starter npm scripts such as `npm run norna:content:check`; those scripts
|
|
5
|
+
call the local `norna` binary from `node_modules/.bin`.
|
|
6
|
+
|
|
7
|
+
Npm installation exposes the command as `norna` on macOS, Linux, and Windows
|
|
8
|
+
through the package `bin` field. When a globally installed `norna` is started
|
|
9
|
+
inside a project that declares and has installed its own `@janga/norna`
|
|
10
|
+
dependency, the launcher delegates to that project-local version. If no
|
|
11
|
+
project-local install is found, the version that was started continues running.
|
|
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 ...`.
|
|
5
15
|
|
|
6
16
|
## CLI Commands
|
|
7
17
|
|
|
@@ -15,8 +25,8 @@ norna dev:stop
|
|
|
15
25
|
norna config:check
|
|
16
26
|
norna content:check
|
|
17
27
|
norna content:sync
|
|
18
|
-
norna typography
|
|
19
|
-
norna typography
|
|
28
|
+
norna typography presets
|
|
29
|
+
norna typography show
|
|
20
30
|
norna site:public
|
|
21
31
|
norna images
|
|
22
32
|
norna engine:update [version|latest]
|
|
@@ -45,7 +55,7 @@ norna --help
|
|
|
45
55
|
## Starter npm Scripts
|
|
46
56
|
|
|
47
57
|
The starter uses `norna:*` for norna-specific work. This avoids collisions
|
|
48
|
-
when a
|
|
58
|
+
when a Norna site is embedded inside a larger GitHub project
|
|
49
59
|
whose own `build`, `test`, or deploy scripts mean something different.
|
|
50
60
|
|
|
51
61
|
The starter defines:
|
|
@@ -80,7 +90,7 @@ npm run build
|
|
|
80
90
|
|
|
81
91
|
`npm run dev` calls `npm run norna:dev`. In the pure starter,
|
|
82
92
|
`npm run build` aliases `npm run norna:build`. In mixed repositories, such as
|
|
83
|
-
a GitHub project that embeds a
|
|
93
|
+
a GitHub project that embeds a Norna site next to an app, `build`
|
|
84
94
|
should normally mean the repository's complete publishable artifact, while
|
|
85
95
|
`norna:build` builds only the `norna` part.
|
|
86
96
|
|
|
@@ -91,14 +101,15 @@ should normally mean the repository's complete publishable artifact, while
|
|
|
91
101
|
cache path.
|
|
92
102
|
- `config:check`: validates `site/config.mjs` against the runtime config
|
|
93
103
|
reader.
|
|
94
|
-
- `content:check`: validates section structure and
|
|
104
|
+
- `content:check`: validates section structure and image references, then
|
|
95
105
|
runs `astro sync`.
|
|
96
106
|
- `content:sync` / `norna:sync`: rewrites Markdown section order and moves misplaced referenced
|
|
97
107
|
image files after confirmation.
|
|
98
|
-
- `typography
|
|
108
|
+
- `typography presets`: prints the exact built-in values for every typography
|
|
99
109
|
preset.
|
|
100
|
-
- `typography
|
|
101
|
-
|
|
110
|
+
- `typography show`: prints the selected site's resolved typography for the
|
|
111
|
+
theme, every page route, and every section. Each value includes its source,
|
|
112
|
+
and inherited page or section values are marked with `inherited: true`.
|
|
102
113
|
- `site:public`: copies `site/public/` into `site/.norna/public/` and
|
|
103
114
|
removes stale copied static files.
|
|
104
115
|
- `images`: generates WebP variants and writes
|
|
@@ -114,13 +125,15 @@ should normally mean the repository's complete publishable artifact, while
|
|
|
114
125
|
engine version, engine root, Astro dependency, and installed Astro version.
|
|
115
126
|
With `--latest`, it also asks npm for the latest published engine version.
|
|
116
127
|
- `init <target-dir> [--type pure|embedded] [--site-dir <path>]`: creates a
|
|
117
|
-
|
|
128
|
+
standalone site project from the packaged starter, or adds a Norna site
|
|
118
129
|
directory plus `norna:*` scripts to an existing project in embedded mode.
|
|
119
130
|
Pure setup pins `@janga/norna` to the version that created it.
|
|
120
131
|
- `build`: runs config check, content check, public sync, image generation, and
|
|
121
132
|
Astro build.
|
|
122
133
|
- `build:local`: runs `build` and restarts `dev:local`.
|
|
123
|
-
- `dev:local`: starts Astro dev in background mode on `localhost:4321`.
|
|
134
|
+
- `dev:local`: starts Astro dev in background mode on `localhost:4321`. Pass
|
|
135
|
+
`--kill` to stop processes that are blocking the standard port before
|
|
136
|
+
starting.
|
|
124
137
|
- `dev:lan`: starts the same server on all local network interfaces and prints
|
|
125
138
|
the IPv4 URL to open from another device on the same network. Stop it after
|
|
126
139
|
testing because it is accessible to that local network.
|
package/docs/configuration.md
CHANGED
|
@@ -16,8 +16,9 @@ the current values for any one site.
|
|
|
16
16
|
- Required: yes.
|
|
17
17
|
- Default: none.
|
|
18
18
|
- Validation: non-empty absolute URL accepted by `new URL()`.
|
|
19
|
-
- Consequence: wrong values render a wrong canonical URL and make deploy
|
|
20
|
-
point at the wrong site.
|
|
19
|
+
- Consequence: wrong values render a wrong canonical URL and make deploy
|
|
20
|
+
output point at the wrong site. For GitHub Pages project sites, include the
|
|
21
|
+
repository path in the URL, for example `https://owner.github.io/repo-name/`.
|
|
21
22
|
|
|
22
23
|
Example:
|
|
23
24
|
|
|
@@ -27,152 +28,50 @@ site: {
|
|
|
27
28
|
}
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
### `site.basePath`
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
headings, section text, galleries, sticky-navigation alignment, and footer.
|
|
36
|
-
- Type: string containing a simple positive CSS length.
|
|
37
|
-
- Required: no.
|
|
38
|
-
- Default: `1180px`.
|
|
39
|
-
- Validation: if set, it must be a positive number followed by one of `px`,
|
|
40
|
-
`rem`, `em`, `vw`, `vh`, `vmin`, `vmax`, `ch`, or `%`.
|
|
41
|
-
- Consequence: the value overrides the global `--page-width` CSS variable.
|
|
42
|
-
It is the outer width limit for content that is centered on the page.
|
|
43
|
-
`gallery.width` cannot render wider than this page width or the available
|
|
44
|
-
viewport width after responsive gutters.
|
|
45
|
-
|
|
46
|
-
Example:
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
layout: {
|
|
50
|
-
pageWidth: '1180px',
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### `layout.gutter`
|
|
55
|
-
|
|
56
|
-
- Purpose: side margin removed from the viewport before the available content
|
|
57
|
-
width is calculated.
|
|
58
|
-
- Type: either a CSS length string used on all viewports, or an object with
|
|
59
|
-
`desktop` and `mobile` CSS length strings.
|
|
60
|
-
- Required: no.
|
|
61
|
-
- Default: desktop `clamp(1.25rem, 4vw, 3rem)`, mobile `1rem`.
|
|
62
|
-
- Validation: if set, each value must be a positive CSS length such as `16px`,
|
|
63
|
-
`3rem`, or `4vw`. `clamp()` with those simple lengths is also accepted.
|
|
64
|
-
- Consequence: wider gutters leave more side margin and reduce the maximum
|
|
65
|
-
available width for galleries and aligned text.
|
|
66
|
-
|
|
67
|
-
Example:
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
layout: {
|
|
71
|
-
gutter: {
|
|
72
|
-
desktop: '48px',
|
|
73
|
-
mobile: '16px',
|
|
74
|
-
},
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Gallery
|
|
79
|
-
|
|
80
|
-
### `gallery.width`
|
|
81
|
-
|
|
82
|
-
- Purpose: maximum rendered width for gallery images, gallery captions, and
|
|
83
|
-
left- or right-aligned section text that is intended to line up with gallery
|
|
84
|
-
edges.
|
|
85
|
-
- Type: string containing a simple positive CSS length.
|
|
86
|
-
- Required: no.
|
|
87
|
-
- Default: `900px`.
|
|
88
|
-
- Validation: if set, it must be a positive number followed by one of `px`,
|
|
89
|
-
`rem`, `em`, `vw`, `vh`, `vmin`, `vmax`, `ch`, or `%`.
|
|
90
|
-
- Consequence: the value overrides the global `--gallery-width` CSS variable.
|
|
91
|
-
Images and aligned text cannot render wider than this value, but the
|
|
92
|
-
effective width is also limited by `layout.pageWidth`, `layout.gutter`, and
|
|
93
|
-
`gallery.maxAvailableWidthPercent`.
|
|
94
|
-
|
|
95
|
-
Example:
|
|
96
|
-
|
|
97
|
-
```js
|
|
98
|
-
gallery: {
|
|
99
|
-
width: '900px',
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### `gallery.maxAvailableWidthPercent`
|
|
104
|
-
|
|
105
|
-
- Purpose: maximum share of the available width, after gutters, that gallery
|
|
106
|
-
images, gallery captions, and aligned section text may use.
|
|
107
|
-
- Type: either a number used on all viewports, or an object with `desktop` and
|
|
108
|
-
`mobile` numbers.
|
|
33
|
+
- Purpose: URL path prefix used for generated internal page links, favicons,
|
|
34
|
+
generated image URLs, and root-relative links or images written in Markdown.
|
|
35
|
+
- Type: string URL path.
|
|
109
36
|
- Required: no.
|
|
110
|
-
- Default:
|
|
111
|
-
- Validation:
|
|
112
|
-
|
|
113
|
-
- Consequence:
|
|
114
|
-
|
|
115
|
-
|
|
37
|
+
- Default: `/`.
|
|
38
|
+
- Validation: must start and end with `/` and must not contain whitespace,
|
|
39
|
+
`?`, `#`, or `//`.
|
|
40
|
+
- Consequence: use `/` for a root site or custom domain. Use
|
|
41
|
+
`/repository-name/` for a GitHub Pages project site without a custom domain.
|
|
42
|
+
Source Markdown can still use root-relative paths such as `/workflow.svg` or
|
|
43
|
+
`/getting-started/`; Norna prefixes them during rendering.
|
|
116
44
|
|
|
117
|
-
|
|
45
|
+
Examples:
|
|
118
46
|
|
|
119
47
|
```js
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
mobile: 100,
|
|
124
|
-
},
|
|
48
|
+
site: {
|
|
49
|
+
url: 'https://example.com/',
|
|
50
|
+
basePath: '/',
|
|
125
51
|
}
|
|
126
52
|
```
|
|
127
53
|
|
|
128
|
-
### `gallery.maxAvailableHeightPercent`
|
|
129
|
-
|
|
130
|
-
- Purpose: maximum share of viewport height that gallery images may use.
|
|
131
|
-
- Type: either a number used on all viewports, or an object with `desktop` and
|
|
132
|
-
`mobile` numbers.
|
|
133
|
-
- Required: no.
|
|
134
|
-
- Default: desktop `74`, mobile `68`.
|
|
135
|
-
- Validation: each value must be greater than `0` and less than or equal to
|
|
136
|
-
`100`.
|
|
137
|
-
- Consequence: images keep their proportions and are scaled down when filling
|
|
138
|
-
the available width would make them taller than this limit. This applies to
|
|
139
|
-
both landscape and portrait images.
|
|
140
|
-
|
|
141
|
-
Example:
|
|
142
|
-
|
|
143
54
|
```js
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
mobile: 68,
|
|
148
|
-
},
|
|
55
|
+
site: {
|
|
56
|
+
url: 'https://janga.github.io/norna/',
|
|
57
|
+
basePath: '/norna/',
|
|
149
58
|
}
|
|
150
59
|
```
|
|
151
60
|
|
|
152
|
-
##
|
|
153
|
-
|
|
154
|
-
### `typography.fontFamily`
|
|
61
|
+
## Visual Theme
|
|
155
62
|
|
|
156
|
-
|
|
157
|
-
navigation.
|
|
158
|
-
- Type: string containing a CSS font-family value.
|
|
159
|
-
- Required: no.
|
|
160
|
-
- Default: `Arial, 'Helvetica Neue', Helvetica, sans-serif`, matching the
|
|
161
|
-
engine's existing sticky-navigation font stack.
|
|
162
|
-
- Validation: if set, it must be a non-empty string and must not contain
|
|
163
|
-
semicolons, braces, or line breaks.
|
|
164
|
-
- Consequence: the value overrides the global `--font-sans` CSS variable for
|
|
165
|
-
the whole page. Section headings, body text, gallery captions, footer text,
|
|
166
|
-
and sticky navigation all inherit from that variable unless engine CSS gives a
|
|
167
|
-
more specific rule.
|
|
63
|
+
Visual configuration lives in `site/theme.md`, not `site/config.mjs`.
|
|
168
64
|
|
|
169
|
-
|
|
65
|
+
Use [Theme](theme.md) for:
|
|
170
66
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
67
|
+
- `layout.pageWidth`
|
|
68
|
+
- `layout.gutter`
|
|
69
|
+
- `gallery.width`
|
|
70
|
+
- `gallery.maxAvailableWidthPercent`
|
|
71
|
+
- `gallery.maxAvailableHeightPercent`
|
|
72
|
+
- `typography.fontFamily`
|
|
73
|
+
- typography presets and overrides
|
|
74
|
+
- presentation colors, inline styles, and frame colors
|
|
176
75
|
|
|
177
76
|
## Navigation
|
|
178
77
|
|
|
@@ -241,7 +140,7 @@ Fields:
|
|
|
241
140
|
`Sections`.
|
|
242
141
|
- `locale.labels.menu`: mobile menu summary text, default `Menu`.
|
|
243
142
|
- `locale.labels.closeMenu`: reserved close-menu label, default `Close menu`.
|
|
244
|
-
- `locale.labels.gallery`:
|
|
143
|
+
- `locale.labels.gallery`: image row ARIA label prefix, default `Images`.
|
|
245
144
|
|
|
246
145
|
Example:
|
|
247
146
|
|
|
@@ -254,7 +153,7 @@ locale: {
|
|
|
254
153
|
pageNavigation: 'På denna sida',
|
|
255
154
|
sectionNavigation: 'Sektioner',
|
|
256
155
|
menu: 'Meny',
|
|
257
|
-
gallery: '
|
|
156
|
+
gallery: 'Bilder',
|
|
258
157
|
},
|
|
259
158
|
}
|
|
260
159
|
```
|
|
@@ -374,3 +273,7 @@ If `NORNA_SITE_DIR` is set to an empty value, commands fail. Relative site
|
|
|
374
273
|
directories are resolved by walking upward from the invocation root until the
|
|
375
274
|
selected directory contains `config.mjs` and `content.md`. Absolute site
|
|
376
275
|
directories are accepted and make their parent the site project root.
|
|
276
|
+
|
|
277
|
+
When no site directory is explicitly selected, the current directory itself can
|
|
278
|
+
be the site directory if it contains `config.mjs` and `content.md`. If not,
|
|
279
|
+
Norna walks upward looking for a default `site/` directory with those files.
|