@janga/norna 0.7.14 → 0.7.16
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/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 +13 -22
- 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/SiteNavigation.astro +3 -3
- package/src/components/SitePage.astro +8 -8
- package/src/components/SiteSection.astro +16 -19
- 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/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
|
@@ -16,6 +16,6 @@ Run it from the repository root with:
|
|
|
16
16
|
node bin/norna.mjs --site-dir examples/feature-demos/media-and-surfaces/site dev:local
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The site has a home page plus routes for
|
|
19
|
+
The site has a home page plus routes for Norna blocks and surfaces. Sitewide
|
|
20
20
|
identity, banners and footers are demonstrated separately in
|
|
21
21
|
`examples/feature-demos/sitewide-content/`.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Media and Surfaces
|
|
3
|
-
description: A visual test bench for Norna's
|
|
3
|
+
description: A visual test bench for Norna's image and card blocks and presentation surfaces.
|
|
4
4
|
navigation:
|
|
5
5
|
label: Home
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Media and surfaces {#intro}
|
|
9
9
|
|
|
10
|
-
This site is a focused test bench for Norna's
|
|
10
|
+
This site is a focused test bench for Norna's image and card blocks, sidenotes,
|
|
11
11
|
palettes and section-surface controls.
|
|
12
12
|
|
|
13
13
|
Use [Media blocks](/media/) to compare image stacks, carousels, card lists and
|
|
@@ -11,8 +11,7 @@ Norna provides a small set of named palettes. The theme chooses one
|
|
|
11
11
|
for the whole site:
|
|
12
12
|
|
|
13
13
|
```yaml
|
|
14
|
-
|
|
15
|
-
palette: dark
|
|
14
|
+
palette: dark
|
|
16
15
|
```
|
|
17
16
|
|
|
18
17
|
The available choices are `dark`, `light` and `paper`. A palette defines the
|
|
@@ -25,10 +24,7 @@ The route theme uses a palette and a surface sequence when a visual pause or
|
|
|
25
24
|
change of rhythm helps the reader. This is not a free-form colour override:
|
|
26
25
|
|
|
27
26
|
```yaml
|
|
28
|
-
|
|
29
|
-
sectionSurfaces:
|
|
30
|
-
mode: cycle
|
|
31
|
-
sequence: [base, soft, emphasis]
|
|
27
|
+
sectionSurfaces: [base, soft, emphasis]
|
|
32
28
|
```
|
|
33
29
|
|
|
34
30
|
The theme can cycle through the selected surfaces automatically. Individual
|
|
@@ -40,5 +36,5 @@ Use the site palette for the overall tone. Use soft and emphasis surfaces for a
|
|
|
40
36
|
small number of meaningful transitions, not to make every section look
|
|
41
37
|
unrelated.
|
|
42
38
|
|
|
43
|
-
Typography
|
|
39
|
+
Typography profiles and Norna blocks can vary the content inside that system;
|
|
44
40
|
surfaces provide the route-level rhythm around it.
|
|
@@ -16,3 +16,11 @@ node bin/norna.mjs --site-dir examples/feature-demos/sitewide-content/site dev:l
|
|
|
16
16
|
|
|
17
17
|
Move between the routes to verify that the same sitewide elements remain in
|
|
18
18
|
place. Banner dismissals are stored locally in the browser.
|
|
19
|
+
|
|
20
|
+
<!-- norna-image-provenance:
|
|
21
|
+
image: site/public/logo.svg
|
|
22
|
+
source: AI-assisted, hand-authored SVG
|
|
23
|
+
prompt: Create a compact horizontal logo named Shared Frame. Use a simple
|
|
24
|
+
overlapping-frame symbol, dark text, one muted red accent, a transparent
|
|
25
|
+
background and no external assets.
|
|
26
|
+
-->
|
|
@@ -8,11 +8,11 @@ navigation:
|
|
|
8
8
|
## One identity across routes {#identity}
|
|
9
9
|
|
|
10
10
|
The logo in the navigation is discovered from `public/logo.svg`. Its alt text
|
|
11
|
-
and display height belong to `sitewide-content.
|
|
11
|
+
and display height belong to `sitewide-content.yaml`, because the identity is
|
|
12
12
|
shared by every route.
|
|
13
13
|
|
|
14
|
-
If a site has no logo file, Norna
|
|
15
|
-
replace the
|
|
14
|
+
If a site has no logo file, Norna shows the navigation label as text instead. A
|
|
15
|
+
route cannot replace the shared navigation identity.
|
|
16
16
|
|
|
17
17
|
## Navigation context {#navigation}
|
|
18
18
|
|
|
@@ -7,7 +7,7 @@ navigation:
|
|
|
7
7
|
|
|
8
8
|
## Banner stack {#banner-stack}
|
|
9
9
|
|
|
10
|
-
The two notices above the page content are defined in `sitewide-content.
|
|
10
|
+
The two notices above the page content are defined in `sitewide-content.yaml`.
|
|
11
11
|
List order controls their order, and each notice keeps its own identity.
|
|
12
12
|
|
|
13
13
|
## Dismissal {#dismissal}
|
|
@@ -7,7 +7,7 @@ navigation:
|
|
|
7
7
|
|
|
8
8
|
## Persistent footer content {#footer-content}
|
|
9
9
|
|
|
10
|
-
The footer below this page is defined once in `sitewide-content.
|
|
10
|
+
The footer below this page is defined once in `sitewide-content.yaml`. Its
|
|
11
11
|
copyright message remains the same across routes.
|
|
12
12
|
|
|
13
13
|
## Build information {#build-information}
|
package/examples/feature-demos/sitewide-content/site/{sitewide-content.md → sitewide-content.yaml}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
---
|
|
2
1
|
navigation:
|
|
2
|
+
label: Shared Frame
|
|
3
3
|
logo:
|
|
4
|
-
alt: Shared Frame
|
|
5
4
|
height: 2.8rem
|
|
6
5
|
banners:
|
|
7
6
|
- id: preview-environment
|
|
@@ -22,12 +21,3 @@ footer:
|
|
|
22
21
|
timeZone: UTC
|
|
23
22
|
dateStyle: medium
|
|
24
23
|
timeStyle: short
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
<!-- norna-image-provenance:
|
|
28
|
-
image: logo.svg
|
|
29
|
-
source: AI-assisted, hand-authored SVG
|
|
30
|
-
prompt: Create a compact horizontal logo named Shared Frame. Use a simple
|
|
31
|
-
overlapping-frame symbol, dark text, one muted red accent, a transparent
|
|
32
|
-
background and no external assets.
|
|
33
|
-
-->
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
url: http://localhost:4321/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
preset: project
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
preset: project
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Fixture Site
|
|
3
|
-
description: Minimal
|
|
3
|
+
description: Minimal Norna fixture site.
|
|
4
4
|
sections:
|
|
5
5
|
intro: {}
|
|
6
6
|
work: {}
|
|
@@ -8,8 +8,8 @@ sections:
|
|
|
8
8
|
---
|
|
9
9
|
## Intro {#intro}
|
|
10
10
|
|
|
11
|
-
This fixture validates the
|
|
11
|
+
This fixture validates the Norna engine against a stable page without managed images.
|
|
12
12
|
|
|
13
13
|
## Work {#work}
|
|
14
14
|
|
|
15
|
-
Fixture section with no
|
|
15
|
+
Fixture section with no managed images.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@janga/norna",
|
|
3
3
|
"description": "An opinionated CLI for building responsive websites from Markdown, images, and theme presets.",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.16",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"examples/",
|
|
31
31
|
"fixtures/",
|
|
32
32
|
"scripts/",
|
|
33
|
+
"schemas/",
|
|
33
34
|
"src/",
|
|
34
35
|
"starters/",
|
|
35
36
|
"!**/.norna/public/",
|
|
@@ -53,10 +54,13 @@
|
|
|
53
54
|
"config:check": "node bin/norna.mjs config:check",
|
|
54
55
|
"content:check": "node bin/norna.mjs content:check",
|
|
55
56
|
"content:sync": "node bin/norna.mjs content:sync",
|
|
57
|
+
"theme:presets": "node bin/norna.mjs theme:presets",
|
|
56
58
|
"theme:export": "node bin/norna.mjs theme:export",
|
|
57
|
-
"typography:
|
|
59
|
+
"typography:profiles": "node bin/norna.mjs typography profiles",
|
|
58
60
|
"typography:show": "node bin/norna.mjs typography show",
|
|
59
61
|
"site:public": "node bin/norna.mjs site:public",
|
|
62
|
+
"schemas:generate": "node scripts/generate-schemas.mjs",
|
|
63
|
+
"schemas:check": "node scripts/generate-schemas.mjs --check",
|
|
60
64
|
"images": "node bin/norna.mjs images",
|
|
61
65
|
"build": "node bin/norna.mjs build",
|
|
62
66
|
"build:pages": "node scripts/build-pages.mjs",
|
|
@@ -66,10 +70,11 @@
|
|
|
66
70
|
"deploy:watch": "node bin/norna.mjs deploy:watch",
|
|
67
71
|
"doctor": "node bin/norna.mjs doctor",
|
|
68
72
|
"demo:build": "node bin/norna.mjs --site-dir examples/feature-demos/media-and-surfaces/site build",
|
|
69
|
-
"test": "npm run test:route-model && npm run test:project-config && npm run test:content-check && npm run test:content-model-v2 && npm run test:theme-presets && npm run test:site-public && npm run test:cli-discovery && npm run test:engine-commands && npm run test:documentation && npm run test:ci-lockfile && npm run test:temporary-visibility && npm run test:client-javascript && npm run test:fixture:build && npm run test:examples && npm run package:check",
|
|
73
|
+
"test": "npm run schemas:check && npm run test:schemas && npm run test:route-model && npm run test:project-config && npm run test:editor-language && npm run test:content-check && npm run test:content-model-v2 && npm run test:theme-presets && npm run test:site-public && npm run test:cli-discovery && npm run test:engine-commands && npm run test:documentation && npm run test:ci-lockfile && npm run test:temporary-visibility && npm run test:client-javascript && npm run test:fixture:build && npm run test:examples && npm run package:check",
|
|
70
74
|
"test:fixture:build": "node bin/norna.mjs --site-dir fixtures/basic/site build",
|
|
71
75
|
"test:examples": "node scripts/test-examples.mjs",
|
|
72
76
|
"test:route-model": "node scripts/test-route-model.mjs",
|
|
77
|
+
"test:schemas": "node scripts/test-schemas.mjs",
|
|
73
78
|
"test:project-config": "node scripts/test-project-config.mjs",
|
|
74
79
|
"test:content-check": "node scripts/test-content-check.mjs",
|
|
75
80
|
"test:content-model-v2": "node scripts/test-content-model-v2.mjs",
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
"test:site-public": "node scripts/test-site-public.mjs",
|
|
78
83
|
"test:cli-discovery": "node scripts/test-cli-discovery.mjs",
|
|
79
84
|
"test:engine-commands": "node scripts/test-engine-commands.mjs",
|
|
85
|
+
"test:editor-language": "node scripts/test-editor-language-service.mjs && npm --prefix editors/vscode run check",
|
|
80
86
|
"test:documentation": "node scripts/test-documentation.mjs",
|
|
81
87
|
"test:ci-lockfile": "node scripts/test-ci-lockfile.mjs",
|
|
82
88
|
"test:temporary-visibility": "node scripts/test-temporary-visibility.mjs",
|
|
@@ -95,6 +101,7 @@
|
|
|
95
101
|
"dependencies": {
|
|
96
102
|
"astro": "^7.1.3",
|
|
97
103
|
"embla-carousel": "^8.6.0",
|
|
104
|
+
"js-yaml": "^4.3.1",
|
|
98
105
|
"satteri": "^0.9.1"
|
|
99
106
|
},
|
|
100
107
|
"devDependencies": {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uri",
|
|
8
|
+
"description": "Absolute public URL for the built site.",
|
|
9
|
+
"markdownDescription": "```yaml\nurl: https://example.com/\n```\n\nThe absolute public URL. Its path also determines the base path for generated links and assets.\n\n[Public URL reference](https://github.com/janga/norna/blob/v0.7.16/docs/configuration.md#url)",
|
|
10
|
+
"examples": [
|
|
11
|
+
"https://example.com/",
|
|
12
|
+
"https://owner.github.io/repository-name/"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"language": {
|
|
16
|
+
"description": "Site language tag using Norna's English or Swedish interface text; the default is en.",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^(?:en|sv)(?:-[a-zA-Z0-9]+)*$",
|
|
19
|
+
"default": "en",
|
|
20
|
+
"examples": [
|
|
21
|
+
"en",
|
|
22
|
+
"sv",
|
|
23
|
+
"en-GB",
|
|
24
|
+
"sv-SE"
|
|
25
|
+
],
|
|
26
|
+
"oneOf": [
|
|
27
|
+
{
|
|
28
|
+
"const": "en",
|
|
29
|
+
"title": "English",
|
|
30
|
+
"description": "Use Norna's built-in English interface text."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"const": "sv",
|
|
34
|
+
"title": "Swedish",
|
|
35
|
+
"description": "Use Norna's built-in Swedish interface text."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^(?:en|sv)-[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$",
|
|
40
|
+
"title": "Regional language tag",
|
|
41
|
+
"description": "Use an English or Swedish regional language tag such as en-GB or sv-SE."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"markdownDescription": "```yaml\nlanguage: en-GB\n```\n\nSets the page language and selects Norna's built-in English or Swedish interface text. The default is `en`.\n\n[Language reference](https://github.com/janga/norna/blob/v0.7.16/docs/configuration.md#language)"
|
|
45
|
+
},
|
|
46
|
+
"scrollBehavior": {
|
|
47
|
+
"default": "instant",
|
|
48
|
+
"description": "Use instant anchors by default or the browser's native smooth scrolling.",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"oneOf": [
|
|
51
|
+
{
|
|
52
|
+
"const": "instant",
|
|
53
|
+
"title": "Instant",
|
|
54
|
+
"description": "Jump directly to anchors without animated scrolling. This is the default."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"const": "smooth",
|
|
58
|
+
"title": "Browser smooth",
|
|
59
|
+
"description": "Use the browser's native smooth scrolling for anchor navigation."
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"markdownDescription": "```yaml\nscrollBehavior: smooth\n```\n\nControls same-page anchor movement. `instant` is the default; `smooth` uses the browser's native smooth scrolling.\n\n[Scroll behavior reference](https://github.com/janga/norna/blob/v0.7.16/docs/configuration.md#scrollbehavior)",
|
|
63
|
+
"examples": [
|
|
64
|
+
"instant",
|
|
65
|
+
"smooth"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"url"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"description": "Technical settings for one Norna site. Routes cannot provide technical configuration.",
|
|
74
|
+
"$id": "https://janga.github.io/norna/schemas/config.schema.json",
|
|
75
|
+
"title": "Norna site configuration",
|
|
76
|
+
"markdownDescription": "```yaml\nurl: https://example.com/\n```\n\n`config.yaml` contains the few technical settings shared by the complete site.\n\n[Configuration reference](https://github.com/janga/norna/blob/v0.7.16/docs/configuration.md)"
|
|
77
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"title": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "Page title used in metadata and route navigation.",
|
|
8
|
+
"markdownDescription": "```yaml\ntitle: About\n```\n\nThe page title used in metadata and, by default, route navigation.\n\n[Page frontmatter reference](https://github.com/janga/norna/blob/v0.7.16/docs/content.md#page-frontmatter)",
|
|
9
|
+
"examples": [
|
|
10
|
+
"About"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Page description used in metadata.",
|
|
16
|
+
"markdownDescription": "```yaml\ndescription: About this project.\n```\n\nA concise page description used in metadata.\n\n[Page frontmatter reference](https://github.com/janga/norna/blob/v0.7.16/docs/content.md#page-frontmatter)",
|
|
17
|
+
"examples": [
|
|
18
|
+
"About this project."
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"navigation": {
|
|
22
|
+
"description": "Optional navigation metadata for this page.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"include": {
|
|
26
|
+
"description": "Include this page in site navigation. Pages are included when omitted.",
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"label": {
|
|
30
|
+
"description": "Navigation label when it should differ from the page title.",
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"markdownDescription": "```yaml\nnavigation:\n include: true\n label: About us\n```\n\nControls whether a route appears in site navigation and optionally replaces its visible title there. Homepage navigation is section-based.\n\n[Route navigation reference](https://github.com/janga/norna/blob/v0.7.16/docs/routes.md#navigation)"
|
|
36
|
+
},
|
|
37
|
+
"sections": {
|
|
38
|
+
"default": {},
|
|
39
|
+
"description": "Optional metadata keyed by Markdown section id. Do not duplicate section order here.",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"propertyNames": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[a-z0-9-]+$"
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"visible": {
|
|
49
|
+
"description": "Optional date window for this section.",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"from": {
|
|
53
|
+
"description": "First date on which the content is visible.",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
56
|
+
},
|
|
57
|
+
"until": {
|
|
58
|
+
"description": "First date on which the content is no longer visible.",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"description": "Metadata keyed by the explicit Markdown section id. Markdown order remains authoritative."
|
|
68
|
+
},
|
|
69
|
+
"markdownDescription": "```yaml\nsections:\n announcement:\n visible:\n until: \"2026-12-01\"\n```\n\nAdds optional metadata keyed by explicit Markdown section id. Markdown headings remain the source of section content and order.\n\n[Section metadata reference](https://github.com/janga/norna/blob/v0.7.16/docs/content.md#section-metadata)"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": [
|
|
73
|
+
"title",
|
|
74
|
+
"description"
|
|
75
|
+
],
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"description": "Frontmatter for a homepage or route content.md file.",
|
|
78
|
+
"$id": "https://janga.github.io/norna/schemas/content-frontmatter.schema.json",
|
|
79
|
+
"title": "Norna page frontmatter",
|
|
80
|
+
"markdownDescription": "```yaml\n---\ntitle: About\ndescription: About this project.\n---\n```\n\nEvery homepage and route `content.md` starts with page metadata, followed by Markdown sections.\n\n[Page frontmatter reference](https://github.com/janga/norna/blob/v0.7.16/docs/content.md#page-frontmatter)"
|
|
81
|
+
}
|