@janga/norna 0.7.22 → 0.7.24
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 +14 -18
- package/astro.config.mjs +15 -0
- package/bin/norna-cli.mjs +8 -2
- package/package.json +28 -3
- package/schemas/category.schema.json +2 -2
- package/schemas/config.schema.json +52 -24
- package/schemas/content-frontmatter.schema.json +25 -5
- package/schemas/page-theme.schema.json +53 -25
- package/schemas/sitewide-content.schema.json +19 -18
- package/schemas/theme.schema.json +385 -252
- package/scripts/build-site.mjs +1 -0
- package/scripts/check-config.mjs +36 -5
- package/scripts/deploy-site.mjs +0 -1
- package/scripts/dev-local.mjs +175 -112
- package/scripts/generate-search-index.mjs +57 -0
- package/scripts/init-site.mjs +1 -0
- package/scripts/lib/code-fence-metadata.mjs +223 -0
- package/scripts/lib/content-sync-apply.mjs +34 -0
- package/scripts/lib/content-sync-plan.mjs +179 -0
- package/scripts/lib/edit-source-link.mjs +49 -0
- package/scripts/lib/editor-language-service.mjs +160 -12
- package/scripts/lib/heading-ids.mjs +1 -1
- package/scripts/lib/image-presentation.mjs +6 -0
- package/scripts/lib/markdown-links.mjs +182 -0
- package/scripts/lib/navigation-model.mjs +44 -12
- package/scripts/lib/navigation-review.mjs +396 -0
- package/scripts/lib/norna-markdown-blocks.mjs +74 -26
- package/scripts/lib/norna-markdown-render-plugin.mjs +64 -1
- package/scripts/lib/page-aliases.mjs +184 -0
- package/scripts/lib/page-markdown.mjs +88 -7
- package/scripts/lib/page-move-plan.mjs +659 -0
- package/scripts/lib/presentation-palette-metadata.mjs +1 -1
- package/scripts/lib/presentation.mjs +10 -37
- package/scripts/lib/project-config.mjs +146 -19
- package/scripts/lib/public-asset-conventions.mjs +36 -2
- package/scripts/lib/schema-definitions.mjs +43 -15
- package/scripts/lib/schema-editor-metadata.mjs +60 -32
- package/scripts/lib/schema-value-definitions.mjs +6 -2
- package/scripts/lib/semantic-callouts.mjs +128 -0
- package/scripts/lib/site-content.mjs +28 -5
- package/scripts/lib/site-link-graph.mjs +357 -0
- package/scripts/lib/site-navigation-tree.mjs +85 -0
- package/scripts/lib/site-page-urls.mjs +10 -0
- package/scripts/lib/sitemap.mjs +34 -0
- package/scripts/lib/social-image-assets.mjs +30 -0
- package/scripts/lib/theme-presets.mjs +53 -25
- package/scripts/lib/theme-profiles.mjs +6 -8
- package/scripts/lib/yaml-config.mjs +6 -2
- package/scripts/move-site-page.mjs +256 -0
- package/scripts/review-navigation.mjs +32 -0
- package/scripts/sync-content-sections.mjs +182 -216
- package/scripts/sync-site-public.mjs +43 -3
- package/src/components/CodeBlockCopyScript.astro +97 -0
- package/src/components/DisplaySettings.astro +4 -4
- package/src/components/EditSourceLink.astro +17 -0
- package/src/components/ImageCarousel.astro +6 -3
- package/src/components/NavigationPageTree.astro +81 -86
- package/src/components/NavigationTreeControls.astro +77 -0
- package/src/components/PageAliasRedirect.astro +49 -0
- package/src/components/PageContentsNavigation.astro +21 -0
- package/src/components/PageList.astro +33 -0
- package/src/components/PageSequenceNavigation.astro +37 -0
- package/src/components/SearchPage.astro +151 -0
- package/src/components/SectionNavigationScript.astro +62 -6
- package/src/components/SiteNavigation.astro +50 -11
- package/src/components/SitePage.astro +113 -20
- package/src/components/SiteSection.astro +16 -3
- package/src/components/SiteTreeNavigation.astro +8 -2
- package/src/components/TreeNavigationScript.astro +207 -26
- package/src/content.config.ts +5 -2
- package/src/layouts/BaseLayout.astro +71 -10
- package/src/lib/readerPreferencesScript.mjs +2 -2
- package/src/lib/sectionContent.ts +32 -3
- package/src/lib/siteNavigation.ts +31 -52
- package/src/lib/sitePages.ts +3 -2
- package/src/lib/sitePublicAssets.ts +1 -0
- package/src/pages/404.astro +110 -0
- package/src/pages/[...slug].astro +45 -8
- package/src/styles/content.css +718 -0
- package/src/styles/foundations.css +284 -0
- package/src/styles/global.css +6 -2510
- package/src/styles/media.css +518 -0
- package/src/styles/navigation.css +526 -0
- package/src/styles/page-layout.css +786 -0
- package/src/styles/responsive.css +594 -0
- package/starters/basic/README.md +6 -19
- package/starters/basic/package.json +1 -0
- package/starters/basic/site/pages/000-home/content.md +13 -50
package/README.md
CHANGED
|
@@ -76,8 +76,8 @@ site/
|
|
|
76
76
|
- `theme.yaml` normally selects one complete visual preset.
|
|
77
77
|
- `sitewide-content.yaml` holds shared logo display settings, banners, and
|
|
78
78
|
footer content.
|
|
79
|
-
- `config.yaml` holds the public URL and optional language,
|
|
80
|
-
and scroll behavior.
|
|
79
|
+
- `config.yaml` holds the public URL and optional language, source edit link,
|
|
80
|
+
navigation model, static search, and scroll behavior.
|
|
81
81
|
- `public/` holds static files copied without processing.
|
|
82
82
|
|
|
83
83
|
Norna validates this structure, processes managed images when needed, and
|
|
@@ -93,26 +93,22 @@ builds the generated website into `dist/`.
|
|
|
93
93
|
reviewed, versioned, and edited with the tools you already use.
|
|
94
94
|
- **A complete publishing path.** The starter includes validation, static
|
|
95
95
|
builds, and an integrated GitHub Pages workflow.
|
|
96
|
+
- **Static search without a service.** One optional setting indexes the
|
|
97
|
+
completed pages and adds section-level search results.
|
|
96
98
|
|
|
97
99
|
## Examples
|
|
98
100
|
|
|
99
101
|
Every example is built in the repository test suite and published with the
|
|
100
|
-
documentation.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
| Statement preset | [Open demo](https://janga.github.io/norna/examples/feature-demos/theme-preset-statement/) | [View files](examples/feature-demos/theme-preset-statement/) |
|
|
111
|
-
| Media and surfaces | [Open demo](https://janga.github.io/norna/examples/feature-demos/media-and-surfaces/) | [View files](examples/feature-demos/media-and-surfaces/) |
|
|
112
|
-
| Sitewide content | [Open demo](https://janga.github.io/norna/examples/feature-demos/sitewide-content/) | [View files](examples/feature-demos/sitewide-content/) |
|
|
113
|
-
|
|
114
|
-
See [examples/README.md](examples/README.md) for what each example is intended
|
|
115
|
-
to demonstrate and how to run it locally.
|
|
102
|
+
documentation. Start with the
|
|
103
|
+
[single-page](https://janga.github.io/norna/examples/complete-sites/dog-shelter-single-page/)
|
|
104
|
+
and [multi-page](https://janga.github.io/norna/examples/complete-sites/dog-shelter-multi-page/)
|
|
105
|
+
dog-shelter sites to inspect complete projects. Use the
|
|
106
|
+
[Theme explorer](https://janga.github.io/norna/examples/theme-presets/) to
|
|
107
|
+
compare presets and palettes against unchanged representative content.
|
|
108
|
+
|
|
109
|
+
The [example source index](examples/README.md) describes every maintained
|
|
110
|
+
complete site and feature demonstration, links its live result, and shows how
|
|
111
|
+
to run it locally.
|
|
116
112
|
|
|
117
113
|
## Is Norna A Good Fit?
|
|
118
114
|
|
package/astro.config.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { promisify } from 'node:util';
|
|
|
5
5
|
import { defineConfig } from 'astro/config';
|
|
6
6
|
import { satteri } from '@astrojs/markdown-satteri';
|
|
7
7
|
import { getBasePathRedirectLocation } from './scripts/lib/base-path-redirect.mjs';
|
|
8
|
+
import { nornaCodeFenceTransformer } from './scripts/lib/code-fence-metadata.mjs';
|
|
8
9
|
import { nornaMarkdownRenderPlugin } from './scripts/lib/norna-markdown-render-plugin.mjs';
|
|
9
10
|
import {
|
|
10
11
|
astroCacheDir,
|
|
@@ -136,7 +137,18 @@ export default defineConfig({
|
|
|
136
137
|
base: projectConfig.site.basePath,
|
|
137
138
|
cacheDir: astroCacheDir,
|
|
138
139
|
markdown: {
|
|
140
|
+
shikiConfig: {
|
|
141
|
+
transformers: [nornaCodeFenceTransformer],
|
|
142
|
+
},
|
|
139
143
|
processor: satteri({
|
|
144
|
+
features: {
|
|
145
|
+
gfm: {
|
|
146
|
+
footnotes: {
|
|
147
|
+
label: projectConfig.locale.labels.footnotes,
|
|
148
|
+
backLabel: projectConfig.locale.labels.footnoteBackReference,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
140
152
|
mdastPlugins: [nornaMarkdownRenderPlugin],
|
|
141
153
|
}),
|
|
142
154
|
},
|
|
@@ -144,6 +156,9 @@ export default defineConfig({
|
|
|
144
156
|
publicDir: astroPublicDir,
|
|
145
157
|
srcDir: path.join(engineRoot, 'src'),
|
|
146
158
|
vite: {
|
|
159
|
+
server: {
|
|
160
|
+
strictPort: true,
|
|
161
|
+
},
|
|
147
162
|
plugins: [nornaBasePathRedirect(), nornaGeneratedImagesWatcher()],
|
|
148
163
|
},
|
|
149
164
|
});
|
package/bin/norna-cli.mjs
CHANGED
|
@@ -8,8 +8,8 @@ const usage = `
|
|
|
8
8
|
Usage: norna <command> [options]
|
|
9
9
|
|
|
10
10
|
Commands:
|
|
11
|
-
dev:local
|
|
12
|
-
dev:lan
|
|
11
|
+
dev:local [--kill] Start local Astro dev server on the configured port
|
|
12
|
+
dev:lan [--kill] Start LAN dev server on the configured port
|
|
13
13
|
dev:restart Restart local Astro dev server
|
|
14
14
|
dev:status Show local dev server status
|
|
15
15
|
dev:logs Show local dev server logs
|
|
@@ -18,6 +18,7 @@ Commands:
|
|
|
18
18
|
config:check Validate site/config.yaml
|
|
19
19
|
content:check Validate page content and managed image references
|
|
20
20
|
content:sync Move misplaced Norna-managed images and refresh generated images
|
|
21
|
+
navigation:review Review the derived navigation structure without changing files
|
|
21
22
|
theme:presets List available theme presets and their intended uses
|
|
22
23
|
theme:export Export a commented theme preset reference
|
|
23
24
|
typography profiles Show built-in typography profile values
|
|
@@ -28,6 +29,7 @@ Commands:
|
|
|
28
29
|
engine:version Show installed engine and Astro versions
|
|
29
30
|
init Create a new site project from the starter
|
|
30
31
|
page:add Add a page to the site page tree
|
|
32
|
+
page:move Move a page subtree and update internal links
|
|
31
33
|
category:add Add a non-routable category to the site page tree
|
|
32
34
|
build Build the selected site
|
|
33
35
|
build:local Build and restart local dev server
|
|
@@ -139,6 +141,8 @@ try {
|
|
|
139
141
|
} else if (command === 'content:sync') {
|
|
140
142
|
await runScript('scripts/sync-content-sections.mjs', ['--write', ...rest]);
|
|
141
143
|
await runScript('scripts/generate-images.mjs', rest);
|
|
144
|
+
} else if (command === 'navigation:review') {
|
|
145
|
+
await runScript('scripts/review-navigation.mjs', rest);
|
|
142
146
|
} else if (command === 'theme:presets') {
|
|
143
147
|
await runScript('scripts/list-theme-presets.mjs', rest);
|
|
144
148
|
} else if (command === 'theme:export') {
|
|
@@ -163,6 +167,8 @@ try {
|
|
|
163
167
|
await runScript('scripts/init-site.mjs', rest);
|
|
164
168
|
} else if (command === 'page:add') {
|
|
165
169
|
await runScript('scripts/add-site-node.mjs', ['page', ...rest]);
|
|
170
|
+
} else if (command === 'page:move') {
|
|
171
|
+
await runScript('scripts/move-site-page.mjs', rest);
|
|
166
172
|
} else if (command === 'category:add') {
|
|
167
173
|
await runScript('scripts/add-site-node.mjs', ['category', ...rest]);
|
|
168
174
|
} else if (command === 'build') {
|
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.24",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -42,12 +42,15 @@
|
|
|
42
42
|
"scripts/export-theme-preset.mjs",
|
|
43
43
|
"scripts/generate-images.mjs",
|
|
44
44
|
"scripts/generate-schemas.mjs",
|
|
45
|
+
"scripts/generate-search-index.mjs",
|
|
45
46
|
"scripts/init-site.mjs",
|
|
46
47
|
"scripts/lib/",
|
|
47
48
|
"!scripts/lib/documentation-preset-candidates.mjs",
|
|
48
49
|
"!scripts/lib/example-sites.mjs",
|
|
49
50
|
"!scripts/lib/git-status.mjs",
|
|
50
51
|
"scripts/list-theme-presets.mjs",
|
|
52
|
+
"scripts/move-site-page.mjs",
|
|
53
|
+
"scripts/review-navigation.mjs",
|
|
51
54
|
"scripts/show-typography.mjs",
|
|
52
55
|
"scripts/sync-content-sections.mjs",
|
|
53
56
|
"scripts/sync-site-public.mjs",
|
|
@@ -72,6 +75,7 @@
|
|
|
72
75
|
"config:check": "node bin/norna.mjs config:check",
|
|
73
76
|
"content:check": "node bin/norna.mjs content:check",
|
|
74
77
|
"content:sync": "node bin/norna.mjs content:sync",
|
|
78
|
+
"navigation:review": "node bin/norna.mjs navigation:review",
|
|
75
79
|
"theme:presets": "node bin/norna.mjs theme:presets",
|
|
76
80
|
"theme:export": "node bin/norna.mjs theme:export",
|
|
77
81
|
"typography:profiles": "node bin/norna.mjs typography profiles",
|
|
@@ -88,22 +92,38 @@
|
|
|
88
92
|
"deploy:watch": "node bin/norna.mjs deploy:watch",
|
|
89
93
|
"doctor": "node bin/norna.mjs doctor",
|
|
90
94
|
"demo:build": "node scripts/build-demo.mjs",
|
|
91
|
-
"test": "npm run schemas:check && npm run test:dead-code && npm run test:schemas && npm run test:page-model && npm run test:page-markdown && npm run test:site-node-commands && npm run test:nested-pages && npm run test:heading-ids && npm run test:navigation-model && npm run test:project-config && npm run test:editor-language && npm run test:content-check && npm run test:content-
|
|
95
|
+
"test": "npm run schemas:check && npm run test:dead-code && npm run test:schemas && npm run test:page-model && npm run test:page-markdown && npm run test:site-links && npm run test:page-aliases && npm run test:sitemap && npm run test:not-found-page && npm run test:site-node-commands && npm run test:page-move && npm run test:navigation-review && npm run test:nested-pages && npm run test:heading-ids && npm run test:navigation-model && npm run test:project-config && npm run test:edit-source-link && npm run test:static-search && npm run test:editor-language && npm run test:content-check && npm run test:content-sync-plan && npm run test:content-model && npm run test:theme-presets && npm run test:presentation-contract && npm run test:preset-baselines && npm run test:documentation-preset-review && npm run test:site-public && npm run test:cli-discovery && npm run test:dev-local && npm run test:engine-commands && npm run test:documentation && npm run test:ci-lockfile && npm run test:banner-visibility && npm run test:client-javascript && npm run test:fixture:build && npm run test:examples && npm run package:check",
|
|
92
96
|
"test:fixture:build": "node scripts/test-basic-fixture-build.mjs",
|
|
93
97
|
"test:examples": "node scripts/test-examples.mjs",
|
|
94
98
|
"test:page-model": "node scripts/test-page-model.mjs",
|
|
95
99
|
"test:page-markdown": "node scripts/test-page-markdown.mjs",
|
|
100
|
+
"test:site-links": "node scripts/test-site-link-graph.mjs",
|
|
101
|
+
"test:page-aliases": "node scripts/test-page-aliases.mjs",
|
|
102
|
+
"test:sitemap": "node scripts/test-sitemap.mjs",
|
|
103
|
+
"test:not-found-page": "node scripts/test-not-found-page.mjs",
|
|
96
104
|
"test:site-node-commands": "node scripts/test-site-node-commands.mjs",
|
|
105
|
+
"test:page-move": "node scripts/test-page-move.mjs",
|
|
106
|
+
"test:navigation-review": "node scripts/test-navigation-review.mjs",
|
|
97
107
|
"test:nested-pages": "node scripts/test-nested-pages.mjs",
|
|
98
108
|
"test:heading-ids": "node scripts/test-heading-ids.mjs",
|
|
99
109
|
"test:navigation-model": "node scripts/test-navigation-model.mjs",
|
|
100
110
|
"test:schemas": "node scripts/test-schemas.mjs",
|
|
101
111
|
"test:project-config": "node scripts/test-project-config.mjs",
|
|
112
|
+
"test:edit-source-link": "node scripts/test-edit-source-link.mjs",
|
|
113
|
+
"test:static-search": "node scripts/test-static-search.mjs",
|
|
102
114
|
"test:content-check": "node scripts/test-content-check.mjs",
|
|
103
|
-
"test:content-
|
|
115
|
+
"test:content-sync-plan": "node scripts/test-content-sync-plan.mjs",
|
|
116
|
+
"test:content-model": "npm run test:page-content && npm run test:managed-media && npm run test:content-sync && npm run test:markdown-constructs",
|
|
117
|
+
"test:page-content": "node scripts/test-page-content.mjs",
|
|
118
|
+
"test:managed-media": "node scripts/test-managed-media.mjs",
|
|
119
|
+
"test:content-sync": "node scripts/test-content-sync.mjs",
|
|
120
|
+
"test:markdown-constructs": "node scripts/test-markdown-constructs.mjs",
|
|
104
121
|
"test:theme-presets": "node scripts/test-theme-presets.mjs",
|
|
105
122
|
"test:presentation-contract": "node scripts/test-presentation-contract.mjs",
|
|
106
123
|
"test:presentation:browser": "node scripts/test-navigation.mjs --site-dir fixtures/preset-baseline/site tests/presentation-contract.spec.ts",
|
|
124
|
+
"test:navigation-surfaces:browser": "npm run test:navigation-surfaces:top && npm run test:navigation-surfaces:tree",
|
|
125
|
+
"test:navigation-surfaces:top": "node scripts/test-navigation.mjs --site-dir fixtures/content-model-v2/site tests/navigation-surfaces-top.spec.ts",
|
|
126
|
+
"test:navigation-surfaces:tree": "node scripts/test-navigation.mjs --site-dir fixtures/preset-baseline/site tests/presentation-contract.spec.ts",
|
|
107
127
|
"test:preset-baselines": "node scripts/test-preset-baselines.mjs",
|
|
108
128
|
"test:documentation-preset-review": "node scripts/test-documentation-preset-review.mjs",
|
|
109
129
|
"preset:baselines:capture": "node scripts/test-preset-baselines.mjs --capture",
|
|
@@ -113,8 +133,11 @@
|
|
|
113
133
|
"palette:review:build": "node scripts/review-documentation-preset.mjs --palettes --build-only",
|
|
114
134
|
"test:site-public": "node scripts/test-site-public.mjs",
|
|
115
135
|
"test:cli-discovery": "node scripts/test-cli-discovery.mjs",
|
|
136
|
+
"test:dev-local": "node scripts/test-dev-local.mjs",
|
|
116
137
|
"test:engine-commands": "node scripts/test-engine-commands.mjs",
|
|
117
138
|
"test:editor-language": "node scripts/test-editor-language-service.mjs && npm --prefix editors/vscode run check",
|
|
139
|
+
"test:editor-integration": "npm --prefix editors/vscode run test:integration",
|
|
140
|
+
"test:editor-integration:minimum": "npm --prefix editors/vscode run test:integration:minimum",
|
|
118
141
|
"test:documentation": "node scripts/test-documentation.mjs",
|
|
119
142
|
"test:ci-lockfile": "node scripts/test-ci-lockfile.mjs",
|
|
120
143
|
"test:banner-visibility": "node scripts/test-banner-visibility.mjs",
|
|
@@ -122,6 +145,7 @@
|
|
|
122
145
|
"test:dead-code": "knip --include files,exports",
|
|
123
146
|
"test:navigation": "node scripts/test-navigation.mjs",
|
|
124
147
|
"test:navigation:tree": "node scripts/test-navigation.mjs --site-dir fixtures/nested-pages/site tests/navigation-tree.spec.ts",
|
|
148
|
+
"test:navigation:placement": "node scripts/test-navigation.mjs --site-dir fixtures/nested-pages/site tests/page-contents-placement.spec.ts",
|
|
125
149
|
"test:navigation:stress": "node scripts/test-navigation.mjs tests/navigation-stress.spec.ts",
|
|
126
150
|
"test:navigation:preview": "node scripts/test-navigation-preview.mjs",
|
|
127
151
|
"package:check": "node scripts/test-package-check.mjs",
|
|
@@ -138,6 +162,7 @@
|
|
|
138
162
|
"astro": "^7.1.3",
|
|
139
163
|
"embla-carousel": "^8.6.0",
|
|
140
164
|
"js-yaml": "^4.3.1",
|
|
165
|
+
"pagefind": "1.5.2",
|
|
141
166
|
"satteri": "^0.9.1"
|
|
142
167
|
},
|
|
143
168
|
"devDependencies": {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "string",
|
|
7
7
|
"minLength": 1,
|
|
8
8
|
"description": "Navigation label for this non-routable page category.",
|
|
9
|
-
"markdownDescription": "```yaml\nlabel: Guides\n```\n\nThe category label shown in global navigation, tree navigation, mobile navigation, and breadcrumbs.\n\n[Navigation category reference](https://github.com/janga/norna/blob/v0.7.
|
|
9
|
+
"markdownDescription": "```yaml\nlabel: Guides\n```\n\nThe category label shown in global navigation, tree navigation, mobile navigation, and breadcrumbs.\n\n[Navigation category reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation-categories)"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"required": [
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"description": "A non-routable navigation category containing child pages.",
|
|
17
17
|
"$id": "https://janga.github.io/norna/schemas/category.schema.json",
|
|
18
18
|
"title": "Norna page category",
|
|
19
|
-
"markdownDescription": "```yaml\nlabel: Guides\n```\n\n`category.yaml` creates a navigation-only group for child pages. It has no page content and produces no URL of its own.\n\n[Navigation category reference](https://github.com/janga/norna/blob/v0.7.
|
|
19
|
+
"markdownDescription": "```yaml\nlabel: Guides\n```\n\n`category.yaml` creates a navigation-only group for child pages. It has no page content and produces no URL of its own.\n\n[Navigation category reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation-categories)"
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "string",
|
|
7
7
|
"format": "uri",
|
|
8
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.
|
|
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.24/docs/configuration.md#url)",
|
|
10
10
|
"examples": [
|
|
11
11
|
"https://example.com/",
|
|
12
12
|
"https://owner.github.io/repository-name/"
|
|
@@ -27,12 +27,14 @@
|
|
|
27
27
|
{
|
|
28
28
|
"const": "en",
|
|
29
29
|
"title": "English",
|
|
30
|
-
"description": "Use Norna's built-in English interface text."
|
|
30
|
+
"description": "Use Norna's built-in English interface text.",
|
|
31
|
+
"markdownDescription": "Use Norna's built-in English interface text.\n\n[Language reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#language)"
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
"const": "sv",
|
|
34
35
|
"title": "Swedish",
|
|
35
|
-
"description": "Use Norna's built-in Swedish interface text."
|
|
36
|
+
"description": "Use Norna's built-in Swedish interface text.",
|
|
37
|
+
"markdownDescription": "Use Norna's built-in Swedish interface text.\n\n[Language reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#language)"
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
40
|
"type": "string",
|
|
@@ -41,7 +43,27 @@
|
|
|
41
43
|
"description": "Use an English or Swedish regional language tag such as en-GB or sv-SE."
|
|
42
44
|
}
|
|
43
45
|
],
|
|
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.
|
|
46
|
+
"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.24/docs/configuration.md#language)"
|
|
47
|
+
},
|
|
48
|
+
"editLink": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"baseUrl": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"format": "uri",
|
|
54
|
+
"description": "Absolute edit URL prefix containing the repository, branch, and any repository subdirectory.",
|
|
55
|
+
"markdownDescription": "```yaml\neditLink:\n baseUrl: https://github.com/owner/repository/edit/main/\n```\n\nAbsolute edit URL prefix. Include any repository subdirectory and branch in this URL. Norna adds the project-relative path to each page's `content.md` file.\n\n[Edit-link reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#edit-link)",
|
|
56
|
+
"examples": [
|
|
57
|
+
"https://github.com/owner/repository/edit/main/"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"baseUrl"
|
|
63
|
+
],
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"description": "Optional base URL for links from rendered pages to their Markdown source files.",
|
|
66
|
+
"markdownDescription": "```yaml\neditLink:\n baseUrl: https://github.com/owner/repository/edit/main/\n```\n\nAdds a localized **Edit this page** link from each rendered page to its `content.md` source file. The base URL identifies the repository, branch, and any repository subdirectory; Norna appends the page source path.\n\n[Edit-link reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#edit-link)"
|
|
45
67
|
},
|
|
46
68
|
"navigation": {
|
|
47
69
|
"type": "object",
|
|
@@ -53,46 +75,50 @@
|
|
|
53
75
|
{
|
|
54
76
|
"const": "automatic",
|
|
55
77
|
"title": "Automatic",
|
|
56
|
-
"description": "Choose sections for one page, top navigation for a
|
|
78
|
+
"description": "Choose sections for one page, top navigation for a flat multi-page site, and a stable left rail throughout a site with listed child pages or categories.",
|
|
79
|
+
"markdownDescription": "Choose sections for one page, top navigation for a flat multi-page site, and a stable left rail throughout a site with listed child pages or categories.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
57
80
|
},
|
|
58
81
|
{
|
|
59
82
|
"const": "sections",
|
|
60
83
|
"title": "Sections",
|
|
61
|
-
"description": "Navigate the sections of the current page."
|
|
84
|
+
"description": "Navigate the sections of the current page.",
|
|
85
|
+
"markdownDescription": "Navigate the sections of the current page.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
62
86
|
},
|
|
63
87
|
{
|
|
64
88
|
"const": "top",
|
|
65
89
|
"title": "Top",
|
|
66
|
-
"description": "Use pages in the top navigation and sections below them."
|
|
90
|
+
"description": "Use pages in the top navigation and sections below them.",
|
|
91
|
+
"markdownDescription": "Use pages in the top navigation and sections below them.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
67
92
|
},
|
|
68
93
|
{
|
|
69
94
|
"const": "tree",
|
|
70
95
|
"title": "Tree",
|
|
71
|
-
"description": "Use a
|
|
96
|
+
"description": "Use a left page rail and a separate right H2/H3 contents rail where the page has enough headings.",
|
|
97
|
+
"markdownDescription": "Use a left page rail and a separate right H2/H3 contents rail where the page has enough headings.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
72
98
|
}
|
|
73
99
|
],
|
|
74
|
-
"markdownDescription": "```yaml\nnavigation:\n mode: automatic\n```\n\nNavigation model. Omit this to let Norna choose from the site structure.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.
|
|
100
|
+
"markdownDescription": "```yaml\nnavigation:\n mode: automatic\n```\n\nNavigation model. Omit this to let Norna choose from the site structure.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)",
|
|
75
101
|
"examples": [
|
|
76
102
|
"automatic",
|
|
77
103
|
"sections",
|
|
78
104
|
"top",
|
|
79
105
|
"tree"
|
|
80
106
|
]
|
|
81
|
-
},
|
|
82
|
-
"sectionTracking": {
|
|
83
|
-
"default": false,
|
|
84
|
-
"description": "As the reader scrolls in tree navigation, mark the last H2 or H3 that has reached the reading area below the sticky header. The URL and keyboard focus do not change.",
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"markdownDescription": "```yaml\nnavigation:\n sectionTracking: true\n```\n\nAs the reader scrolls in tree navigation, mark the last H2 or H3 that has reached the reading area below the sticky header. The URL and keyboard focus do not change.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.22/docs/configuration.md#navigationsectiontracking)",
|
|
87
|
-
"examples": [
|
|
88
|
-
true,
|
|
89
|
-
false
|
|
90
|
-
]
|
|
91
107
|
}
|
|
92
108
|
},
|
|
93
109
|
"additionalProperties": false,
|
|
94
110
|
"description": "Site-wide navigation behavior.",
|
|
95
|
-
"markdownDescription": "```yaml\nnavigation:\n mode: automatic\n```\n\nSets
|
|
111
|
+
"markdownDescription": "```yaml\nnavigation:\n mode: automatic\n```\n\nSets the site-wide navigation policy. `automatic` uses sections for one page, top navigation for a flat multi-page site, and a stable left rail throughout a hierarchical site.\n\n[Navigation reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
112
|
+
},
|
|
113
|
+
"search": {
|
|
114
|
+
"default": false,
|
|
115
|
+
"description": "Generate a static site search page and Pagefind index. The default is false.",
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"markdownDescription": "```yaml\nsearch: true\n```\n\nGenerates a localized `/search/` page and a static Pagefind index during each build. Search is off by default, and only the search page loads the search JavaScript.\n\n[Search reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#search)",
|
|
118
|
+
"examples": [
|
|
119
|
+
true,
|
|
120
|
+
false
|
|
121
|
+
]
|
|
96
122
|
},
|
|
97
123
|
"scrollBehavior": {
|
|
98
124
|
"default": "instant",
|
|
@@ -102,15 +128,17 @@
|
|
|
102
128
|
{
|
|
103
129
|
"const": "instant",
|
|
104
130
|
"title": "Instant",
|
|
105
|
-
"description": "Jump directly to anchors without animated scrolling. This is the default."
|
|
131
|
+
"description": "Jump directly to anchors without animated scrolling. This is the default.",
|
|
132
|
+
"markdownDescription": "Jump directly to anchors without animated scrolling. This is the default.\n\n[Scroll behavior reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#scrollbehavior)"
|
|
106
133
|
},
|
|
107
134
|
{
|
|
108
135
|
"const": "smooth",
|
|
109
136
|
"title": "Browser smooth",
|
|
110
|
-
"description": "Use the browser's native smooth scrolling for anchor navigation."
|
|
137
|
+
"description": "Use the browser's native smooth scrolling for anchor navigation.",
|
|
138
|
+
"markdownDescription": "Use the browser's native smooth scrolling for anchor navigation.\n\n[Scroll behavior reference](https://github.com/janga/norna/blob/v0.7.24/docs/configuration.md#scrollbehavior)"
|
|
111
139
|
}
|
|
112
140
|
],
|
|
113
|
-
"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.
|
|
141
|
+
"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.24/docs/configuration.md#scrollbehavior)",
|
|
114
142
|
"examples": [
|
|
115
143
|
"instant",
|
|
116
144
|
"smooth"
|
|
@@ -124,5 +152,5 @@
|
|
|
124
152
|
"description": "Technical settings for one Norna site. Additional pages cannot provide technical configuration.",
|
|
125
153
|
"$id": "https://janga.github.io/norna/schemas/config.schema.json",
|
|
126
154
|
"title": "Norna site configuration",
|
|
127
|
-
"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.
|
|
155
|
+
"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.24/docs/configuration.md)"
|
|
128
156
|
}
|
|
@@ -9,15 +9,35 @@
|
|
|
9
9
|
"description": "Optional page-specific meta description.",
|
|
10
10
|
"type": "string",
|
|
11
11
|
"minLength": 1,
|
|
12
|
-
"markdownDescription": "```yaml\npage:\n description: About this project.\n```\n\nAn optional page-specific description rendered as `<meta name=\"description\">`. It is not visible in page content.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.
|
|
12
|
+
"markdownDescription": "```yaml\npage:\n description: About this project.\n```\n\nAn optional page-specific description rendered as `<meta name=\"description\">`. It is not visible in page content.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.24/docs/content.md#page-title-and-frontmatter)",
|
|
13
13
|
"examples": [
|
|
14
14
|
"About this project."
|
|
15
15
|
]
|
|
16
|
+
},
|
|
17
|
+
"aliases": {
|
|
18
|
+
"description": "Previous site-relative URLs that permanently identify this page. The current page is always the target.",
|
|
19
|
+
"minItems": 1,
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^\\/(?:[a-z0-9]+(?:-[a-z0-9]+)*\\/)+$",
|
|
24
|
+
"description": "Previous site-relative URL that permanently identifies this page.",
|
|
25
|
+
"markdownDescription": "```yaml\npage:\n aliases:\n - /old-about/\n```\n\nUse a previous Norna page URL. Start and end with `/`; use lowercase ASCII letters, numbers, and single hyphens; do not include the configured base path, a query string, or a fragment.\n\n[Alias path rules](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#preserve-old-page-urls)",
|
|
26
|
+
"examples": [
|
|
27
|
+
"/old-about/"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"markdownDescription": "```yaml\npage:\n aliases:\n - /old-about/\n```\n\nLists previous site-relative URLs that permanently identify this page. The page containing the list is always the target. Paths omit the configured base path and are excluded from the sitemap.\n\n[Preserve old page URLs](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#preserve-old-page-urls)",
|
|
31
|
+
"examples": [
|
|
32
|
+
[
|
|
33
|
+
"/old-about/"
|
|
34
|
+
]
|
|
35
|
+
]
|
|
16
36
|
}
|
|
17
37
|
},
|
|
18
38
|
"additionalProperties": false,
|
|
19
39
|
"description": "Optional metadata for this homepage or additional page. The Markdown H1 supplies the page title.",
|
|
20
|
-
"markdownDescription": "```yaml\npage:\n description: About this project.\n```\n\nContains optional metadata for the current homepage or additional page. The Markdown H1 supplies its title.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.
|
|
40
|
+
"markdownDescription": "```yaml\npage:\n description: About this project.\n aliases:\n - /old-about/\n```\n\nContains optional metadata for the current homepage or additional page. The Markdown H1 supplies its title. An alias records an old URL for this same page.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.24/docs/content.md#page-title-and-frontmatter)"
|
|
21
41
|
},
|
|
22
42
|
"navigation": {
|
|
23
43
|
"description": "Optional navigation metadata for this page.",
|
|
@@ -27,7 +47,7 @@
|
|
|
27
47
|
"default": true,
|
|
28
48
|
"description": "List this page in site navigation. The page remains public when false.",
|
|
29
49
|
"type": "boolean",
|
|
30
|
-
"markdownDescription": "```yaml\nnavigation:\n listed: false\n```\n\nList this page in site navigation. The page remains public when false.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.
|
|
50
|
+
"markdownDescription": "```yaml\nnavigation:\n listed: false\n```\n\nList this page in site navigation. The page remains public when false.\n\n[Read the relevant reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)",
|
|
31
51
|
"examples": [
|
|
32
52
|
true,
|
|
33
53
|
false
|
|
@@ -35,12 +55,12 @@
|
|
|
35
55
|
}
|
|
36
56
|
},
|
|
37
57
|
"additionalProperties": false,
|
|
38
|
-
"markdownDescription": "```yaml\nnavigation:\n listed: false\n```\n\nOptionally excludes an additional page from site navigation without removing its public URL.\n\n[Site navigation reference](https://github.com/janga/norna/blob/v0.7.
|
|
58
|
+
"markdownDescription": "```yaml\nnavigation:\n listed: false\n```\n\nOptionally excludes an additional page from site navigation without removing its public URL.\n\n[Site navigation reference](https://github.com/janga/norna/blob/v0.7.24/docs/pages.md#navigation)"
|
|
39
59
|
}
|
|
40
60
|
},
|
|
41
61
|
"additionalProperties": false,
|
|
42
62
|
"description": "Frontmatter for a homepage or additional page content.md file.",
|
|
43
63
|
"$id": "https://janga.github.io/norna/schemas/content-frontmatter.schema.json",
|
|
44
64
|
"title": "Norna page frontmatter",
|
|
45
|
-
"markdownDescription": "```yaml\n---\npage:\n description: About this project.\n---\n```\n\nContent frontmatter is optional. Write the page title as the single Markdown H1; use frontmatter only for optional metadata or navigation settings.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.
|
|
65
|
+
"markdownDescription": "```yaml\n---\npage:\n description: About this project.\n---\n```\n\nContent frontmatter is optional. Write the page title as the single Markdown H1; use frontmatter only for optional metadata or navigation settings.\n\n[Page title and frontmatter reference](https://github.com/janga/norna/blob/v0.7.24/docs/content.md#page-title-and-frontmatter)"
|
|
46
66
|
}
|