@janga/norna 0.7.25 → 0.7.27
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 +18 -10
- package/astro.config.mjs +26 -12
- package/bin/norna-cli.mjs +14 -2
- package/package.json +14 -5
- package/schemas/card-list.schema.json +121 -0
- package/schemas/category.schema.json +4 -4
- package/schemas/config.schema.json +306 -32
- package/schemas/content-frontmatter.schema.json +8 -8
- package/schemas/image-carousel.schema.json +43 -0
- package/schemas/image-stack.schema.json +43 -0
- package/schemas/manifest.json +6 -1
- package/schemas/page-theme.schema.json +26 -26
- package/schemas/sitewide-content.schema.json +18 -18
- package/schemas/theme.schema.json +237 -262
- package/scripts/add-site-node.mjs +1 -1
- package/scripts/dev-local.mjs +24 -2
- package/scripts/generate-schemas.mjs +15 -3
- package/scripts/lib/category-destinations.mjs +48 -0
- package/scripts/lib/code-fence-metadata.mjs +14 -37
- package/scripts/lib/content-tabs.mjs +155 -0
- package/scripts/lib/details-headings.mjs +58 -0
- package/scripts/lib/documentation-links.mjs +33 -2
- package/scripts/lib/documentation-routes.json +222 -0
- package/scripts/lib/docusaurus-migration-audit.mjs +603 -0
- package/scripts/lib/editor-language-service.mjs +238 -116
- package/scripts/lib/locale-registry.mjs +597 -0
- package/scripts/lib/locales/az-Latn.mjs +78 -0
- package/scripts/lib/locales/be.mjs +78 -0
- package/scripts/lib/locales/bg.mjs +78 -0
- package/scripts/lib/locales/bs.mjs +78 -0
- package/scripts/lib/locales/ca.mjs +78 -0
- package/scripts/lib/locales/cnr.mjs +78 -0
- package/scripts/lib/locales/cs.mjs +78 -0
- package/scripts/lib/locales/da.mjs +78 -0
- package/scripts/lib/locales/de.mjs +78 -0
- package/scripts/lib/locales/el.mjs +78 -0
- package/scripts/lib/locales/en.mjs +78 -0
- package/scripts/lib/locales/es.mjs +78 -0
- package/scripts/lib/locales/et.mjs +78 -0
- package/scripts/lib/locales/fi.mjs +78 -0
- package/scripts/lib/locales/fil.mjs +78 -0
- package/scripts/lib/locales/fr.mjs +78 -0
- package/scripts/lib/locales/ga.mjs +78 -0
- package/scripts/lib/locales/ha.mjs +78 -0
- package/scripts/lib/locales/hr.mjs +78 -0
- package/scripts/lib/locales/hu.mjs +78 -0
- package/scripts/lib/locales/id.mjs +78 -0
- package/scripts/lib/locales/is.mjs +78 -0
- package/scripts/lib/locales/it.mjs +78 -0
- package/scripts/lib/locales/jv.mjs +78 -0
- package/scripts/lib/locales/lb.mjs +78 -0
- package/scripts/lib/locales/lt.mjs +78 -0
- package/scripts/lib/locales/lv.mjs +78 -0
- package/scripts/lib/locales/mk.mjs +78 -0
- package/scripts/lib/locales/mt.mjs +78 -0
- package/scripts/lib/locales/nb.mjs +78 -0
- package/scripts/lib/locales/nl.mjs +78 -0
- package/scripts/lib/locales/nn.mjs +78 -0
- package/scripts/lib/locales/pcm.mjs +78 -0
- package/scripts/lib/locales/pl.mjs +78 -0
- package/scripts/lib/locales/pt.mjs +78 -0
- package/scripts/lib/locales/ro.mjs +78 -0
- package/scripts/lib/locales/ru.mjs +78 -0
- package/scripts/lib/locales/sk.mjs +78 -0
- package/scripts/lib/locales/sl.mjs +78 -0
- package/scripts/lib/locales/sq.mjs +78 -0
- package/scripts/lib/locales/sr-Cyrl.mjs +78 -0
- package/scripts/lib/locales/sr-Latn.mjs +78 -0
- package/scripts/lib/locales/sv.mjs +78 -0
- package/scripts/lib/locales/sw.mjs +78 -0
- package/scripts/lib/locales/tr.mjs +78 -0
- package/scripts/lib/locales/uk.mjs +78 -0
- package/scripts/lib/locales/vi.mjs +78 -0
- package/scripts/lib/markdown-links.mjs +4 -25
- package/scripts/lib/markdown-notes-render-plugin.mjs +75 -0
- package/scripts/lib/markdown-notes.mjs +165 -0
- package/scripts/lib/norna-markdown-blocks.mjs +32 -447
- package/scripts/lib/norna-markdown-render-plugin.mjs +4 -0
- package/scripts/lib/page-aliases.mjs +12 -1
- package/scripts/lib/page-markdown.mjs +63 -16
- package/scripts/lib/page-model.mjs +22 -0
- package/scripts/lib/page-move-plan.mjs +22 -5
- package/scripts/lib/pagefind-translations.mjs +620 -0
- package/scripts/lib/presentation-contract.mjs +6 -1
- package/scripts/lib/presentation.mjs +29 -30
- package/scripts/lib/project-config.mjs +2 -173
- package/scripts/lib/schema-definitions.mjs +6 -13
- package/scripts/lib/schema-editor-metadata.mjs +23 -44
- package/scripts/lib/schema-value-definitions.mjs +4 -8
- package/scripts/lib/semantic-callouts.mjs +4 -2
- package/scripts/lib/site-content.mjs +4 -2
- package/scripts/lib/site-link-graph.mjs +16 -6
- package/scripts/lib/site-navigation-tree.mjs +0 -11
- package/scripts/lib/sitemap.mjs +5 -3
- package/scripts/lib/structured-blocks.mjs +108 -0
- package/scripts/lib/table-render-plugin.mjs +46 -3
- package/scripts/lib/table-row-headers.mjs +218 -0
- package/scripts/lib/theme-presets.mjs +3 -10
- package/scripts/lib/yaml-config.mjs +2 -6
- package/scripts/migrate-check.mjs +19 -0
- package/scripts/sync-content-sections.mjs +39 -10
- package/scripts/sync-site-public.mjs +7 -1
- package/src/components/CodeBlockCopyScript.astro +47 -5
- package/src/components/ContentBlocks.astro +39 -0
- package/src/components/ContentTabsScript.astro +60 -0
- package/src/components/DisplaySettings.astro +17 -19
- package/src/components/NavigationPageTree.astro +1 -1
- package/src/components/NoteNavigationScript.astro +4 -0
- package/src/components/PageAliasRedirect.astro +49 -7
- package/src/components/SearchNavigationScript.astro +4 -0
- package/src/components/SearchPage.astro +43 -2
- package/src/components/SectionNavigationScript.astro +43 -11
- package/src/components/SiteBreadcrumbs.astro +1 -1
- package/src/components/SiteNavigation.astro +29 -20
- package/src/components/SitePage.astro +40 -15
- package/src/components/SiteSection.astro +5 -81
- package/src/components/SiteTreeNavigation.astro +2 -2
- package/src/components/TableOverflowScript.astro +386 -58
- package/src/components/TopPageMenu.astro +47 -0
- package/src/components/TreeNavigationScript.astro +10 -3
- package/src/content.config.ts +5 -8
- package/src/layouts/BaseLayout.astro +8 -12
- package/src/lib/navigationFollowing.ts +142 -0
- package/src/lib/noteNavigation.ts +50 -0
- package/src/lib/searchNavigation.ts +107 -0
- package/src/lib/sectionContent.ts +20 -90
- package/src/lib/siteNavigation.ts +0 -5
- package/src/lib/sitePages.ts +17 -20
- package/src/lib/table-sort-tooltip.ts +109 -0
- package/src/pages/[...slug].astro +16 -6
- package/src/styles/content.css +397 -134
- package/src/styles/foundations.css +9 -0
- package/src/styles/media.css +5 -0
- package/src/styles/navigation.css +63 -74
- package/src/styles/page-layout.css +7 -0
- package/src/styles/responsive.css +2 -7
- package/starters/basic/README.md +1 -1
package/README.md
CHANGED
|
@@ -71,8 +71,9 @@ site/
|
|
|
71
71
|
a routable page or `category.yaml` for a navigation-only group.
|
|
72
72
|
- A page may contain local images. A page or category may contain limited
|
|
73
73
|
presentation settings and nested entries under its own `pages/` directory.
|
|
74
|
-
- Category ids remain in child URLs
|
|
75
|
-
|
|
74
|
+
- Category ids remain in child URLs. Opening a category URL leads to its first
|
|
75
|
+
listed direct page or a generated child list; see
|
|
76
|
+
[Category destinations](https://janga.github.io/norna/reference/site/pages/#opening-a-category-url).
|
|
76
77
|
- `theme.yaml` normally selects one complete visual preset.
|
|
77
78
|
- `sitewide-content.yaml` holds shared logo display settings, banners, and
|
|
78
79
|
footer content.
|
|
@@ -133,24 +134,31 @@ components, and rendering logic.
|
|
|
133
134
|
|
|
134
135
|
GitHub CLI and Playwright are needed only for specific deploy helpers and
|
|
135
136
|
engine diagnostics, not for ordinary editing and local preview. See
|
|
136
|
-
[Requirements and limitations](
|
|
137
|
+
[Requirements and limitations](https://janga.github.io/norna/reference/site/requirements/) for the exact boundaries.
|
|
137
138
|
|
|
138
139
|
## Documentation
|
|
139
140
|
|
|
140
141
|
- [Getting Started](https://janga.github.io/norna/getting-started/install-norna/)
|
|
141
|
-
- [Site files](
|
|
142
|
-
- [Upgrading an existing site](
|
|
143
|
-
- [
|
|
144
|
-
- [
|
|
145
|
-
- [
|
|
146
|
-
- [
|
|
147
|
-
- [Troubleshooting](
|
|
142
|
+
- [Site files](https://janga.github.io/norna/reference/site/files/)
|
|
143
|
+
- [Upgrading an existing site](https://janga.github.io/norna/reference/workflows/upgrading/)
|
|
144
|
+
- [Complete reference](https://janga.github.io/norna/reference/)
|
|
145
|
+
- [Working on a site](https://janga.github.io/norna/reference/workflows/)
|
|
146
|
+
- [JavaScript and accessibility](https://janga.github.io/norna/reference/reader/accessibility/)
|
|
147
|
+
- [Commands](https://janga.github.io/norna/reference/commands/invocation/)
|
|
148
|
+
- [Troubleshooting](https://janga.github.io/norna/faq/installation/)
|
|
148
149
|
- [AI-readable documentation index](https://janga.github.io/norna/llms.txt)
|
|
149
150
|
|
|
150
151
|
Engine contributors should start with
|
|
151
152
|
[Engine Development](docs/engine-development.md). Planning and future work are
|
|
152
153
|
tracked in [BACKLOG.md](BACKLOG.md).
|
|
153
154
|
|
|
155
|
+
The user reference is authored once under `site/pages/032-reference/` and
|
|
156
|
+
rendered on the documentation site. It describes current development; use the
|
|
157
|
+
installed release's Git tag when checking older behavior. Tags through 0.7.26
|
|
158
|
+
keep their reference under `docs/`; later tags use the documentation page tree.
|
|
159
|
+
The [contributor documentation](docs/README.md) explains maintenance and version
|
|
160
|
+
selection.
|
|
161
|
+
|
|
154
162
|
## Support And License
|
|
155
163
|
|
|
156
164
|
Use the [issue tracker](https://github.com/janga/norna/issues) for reproducible
|
package/astro.config.mjs
CHANGED
|
@@ -4,9 +4,11 @@ import path from 'node:path';
|
|
|
4
4
|
import { promisify } from 'node:util';
|
|
5
5
|
import { defineConfig } from 'astro/config';
|
|
6
6
|
import { satteri } from '@astrojs/markdown-satteri';
|
|
7
|
+
import { prepareContentTabs } from './scripts/lib/content-tabs.mjs';
|
|
7
8
|
import { getBasePathRedirectLocation } from './scripts/lib/base-path-redirect.mjs';
|
|
8
9
|
import { nornaCodeFenceTransformer } from './scripts/lib/code-fence-metadata.mjs';
|
|
9
10
|
import { nornaMarkdownRenderPlugin } from './scripts/lib/norna-markdown-render-plugin.mjs';
|
|
11
|
+
import { nornaNotesRenderPlugin } from './scripts/lib/markdown-notes-render-plugin.mjs';
|
|
10
12
|
import { nornaTableRenderPlugin } from './scripts/lib/table-render-plugin.mjs';
|
|
11
13
|
import {
|
|
12
14
|
astroCacheDir,
|
|
@@ -133,6 +135,29 @@ const nornaGeneratedImagesWatcher = () => ({
|
|
|
133
135
|
},
|
|
134
136
|
});
|
|
135
137
|
|
|
138
|
+
const markdownProcessor = satteri({
|
|
139
|
+
features: {
|
|
140
|
+
gfm: { footnotes: {
|
|
141
|
+
label: projectConfig.locale.labels.footnotes,
|
|
142
|
+
backLabel: projectConfig.locale.labels.footnoteBackReference,
|
|
143
|
+
} },
|
|
144
|
+
},
|
|
145
|
+
mdastPlugins: [nornaNotesRenderPlugin, nornaMarkdownRenderPlugin],
|
|
146
|
+
hastPlugins: [nornaTableRenderPlugin],
|
|
147
|
+
});
|
|
148
|
+
const createMarkdownRenderer = markdownProcessor.createRenderer.bind(markdownProcessor);
|
|
149
|
+
markdownProcessor.createRenderer = async (shared) => {
|
|
150
|
+
const renderer = await createMarkdownRenderer(shared);
|
|
151
|
+
return {
|
|
152
|
+
...renderer,
|
|
153
|
+
render(source, options) {
|
|
154
|
+
return renderer.render(prepareContentTabs(source, {
|
|
155
|
+
label: options?.fileURL?.pathname ?? 'Markdown',
|
|
156
|
+
}), options);
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
136
161
|
// https://astro.build/config
|
|
137
162
|
export default defineConfig({
|
|
138
163
|
base: projectConfig.site.basePath,
|
|
@@ -141,18 +166,7 @@ export default defineConfig({
|
|
|
141
166
|
shikiConfig: {
|
|
142
167
|
transformers: [nornaCodeFenceTransformer],
|
|
143
168
|
},
|
|
144
|
-
processor:
|
|
145
|
-
features: {
|
|
146
|
-
gfm: {
|
|
147
|
-
footnotes: {
|
|
148
|
-
label: projectConfig.locale.labels.footnotes,
|
|
149
|
-
backLabel: projectConfig.locale.labels.footnoteBackReference,
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
mdastPlugins: [nornaMarkdownRenderPlugin],
|
|
154
|
-
hastPlugins: [nornaTableRenderPlugin],
|
|
155
|
-
}),
|
|
169
|
+
processor: markdownProcessor,
|
|
156
170
|
},
|
|
157
171
|
outDir: astroDistDir,
|
|
158
172
|
publicDir: astroPublicDir,
|
package/bin/norna-cli.mjs
CHANGED
|
@@ -23,14 +23,15 @@ Commands:
|
|
|
23
23
|
theme:export Export a commented theme preset reference
|
|
24
24
|
typography profiles Show built-in typography profile values
|
|
25
25
|
typography show Show resolved typography for the selected site
|
|
26
|
-
site:public Sync
|
|
26
|
+
site:public Sync static files to the selected site's .norna/public/
|
|
27
27
|
images Generate optimized image variants
|
|
28
28
|
engine:update Update @janga/norna in a site repository
|
|
29
29
|
engine:version Show installed engine and Astro versions
|
|
30
30
|
init Create a new site project from the starter
|
|
31
31
|
page:add Add a page to the site page tree
|
|
32
32
|
page:move Move a page subtree and update internal links
|
|
33
|
-
category:add Add a
|
|
33
|
+
category:add Add a navigation group without an authored page body
|
|
34
|
+
migrate:check Audit a Docusaurus project without modifying it
|
|
34
35
|
build Build the selected site
|
|
35
36
|
build:local Build and restart local dev server
|
|
36
37
|
deploy Build and deploy committed branch
|
|
@@ -100,6 +101,17 @@ if (command === '-h' || command === '--help' || command === 'help') {
|
|
|
100
101
|
process.exit(0);
|
|
101
102
|
}
|
|
102
103
|
|
|
104
|
+
if (command === 'migrate:check') {
|
|
105
|
+
try {
|
|
106
|
+
process.argv = [process.argv[0], process.argv[1], ...rest];
|
|
107
|
+
await import('../scripts/migrate-check.mjs');
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
process.exit(0);
|
|
113
|
+
}
|
|
114
|
+
|
|
103
115
|
const [
|
|
104
116
|
{ runAstroInherit },
|
|
105
117
|
{ engineRoot, siteProjectRoot },
|
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.27",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"scripts/generate-schemas.mjs",
|
|
45
45
|
"scripts/generate-search-index.mjs",
|
|
46
46
|
"scripts/init-site.mjs",
|
|
47
|
+
"scripts/migrate-check.mjs",
|
|
47
48
|
"scripts/lib/",
|
|
48
49
|
"!scripts/lib/documentation-preset-candidates.mjs",
|
|
49
50
|
"!scripts/lib/example-sites.mjs",
|
|
@@ -99,11 +100,13 @@
|
|
|
99
100
|
"deploy:watch": "node bin/norna.mjs deploy:watch",
|
|
100
101
|
"doctor": "node bin/norna.mjs doctor",
|
|
101
102
|
"demo:build": "node scripts/build-demo.mjs",
|
|
102
|
-
"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:presentation-review && 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:review-environments && 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",
|
|
103
|
+
"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:migration-check && 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:locales && 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:presentation-review && 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:review-environments && 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:table-sorting && npm run test:fixture:build && npm run test:examples && npm run package:check",
|
|
103
104
|
"test:fixture:build": "node scripts/test-basic-fixture-build.mjs",
|
|
104
105
|
"test:examples": "node scripts/test-examples.mjs",
|
|
106
|
+
"test:examples:browser": "node scripts/test-navigation.mjs --site-dir site tests/examples-gallery.spec.ts",
|
|
105
107
|
"test:page-model": "node scripts/test-page-model.mjs",
|
|
106
|
-
"test:page-markdown": "node scripts/test-page-markdown.mjs",
|
|
108
|
+
"test:page-markdown": "node scripts/test-page-markdown.mjs && node scripts/test-structured-blocks.mjs && node scripts/test-named-notes.mjs && node scripts/test-content-tabs.mjs",
|
|
109
|
+
"test:tabs:browser": "node scripts/test-navigation.mjs --site-dir fixtures/content-tabs/site tests/content-tabs.spec.ts",
|
|
107
110
|
"test:site-links": "node scripts/test-site-link-graph.mjs",
|
|
108
111
|
"test:page-aliases": "node scripts/test-page-aliases.mjs",
|
|
109
112
|
"test:sitemap": "node scripts/test-sitemap.mjs",
|
|
@@ -111,13 +114,15 @@
|
|
|
111
114
|
"test:site-node-commands": "node scripts/test-site-node-commands.mjs",
|
|
112
115
|
"test:page-move": "node scripts/test-page-move.mjs",
|
|
113
116
|
"test:navigation-review": "node scripts/test-navigation-review.mjs",
|
|
114
|
-
"test:nested-pages": "node scripts/test-nested-pages.mjs",
|
|
117
|
+
"test:nested-pages": "node scripts/test-nested-pages.mjs && node scripts/test-top-navigation-contract.mjs",
|
|
115
118
|
"test:heading-ids": "node scripts/test-heading-ids.mjs",
|
|
116
119
|
"test:navigation-model": "node scripts/test-navigation-model.mjs",
|
|
117
120
|
"test:schemas": "node scripts/test-schemas.mjs",
|
|
118
121
|
"test:project-config": "node scripts/test-project-config.mjs",
|
|
122
|
+
"test:locales": "node scripts/test-locales.mjs",
|
|
119
123
|
"test:edit-source-link": "node scripts/test-edit-source-link.mjs",
|
|
120
124
|
"test:static-search": "node scripts/test-static-search.mjs",
|
|
125
|
+
"test:search:browser": "node scripts/test-navigation.mjs --site-dir site tests/search-navigation.spec.ts",
|
|
121
126
|
"test:content-check": "node scripts/test-content-check.mjs",
|
|
122
127
|
"test:content-sync-plan": "node scripts/test-content-sync-plan.mjs",
|
|
123
128
|
"test:content-model": "npm run test:page-content && npm run test:managed-media && npm run test:content-sync && npm run test:markdown-constructs",
|
|
@@ -130,6 +135,7 @@
|
|
|
130
135
|
"test:presentation-review": "node scripts/test-presentation-review-fixture.mjs",
|
|
131
136
|
"test:presentation:browser": "node scripts/test-navigation.mjs --site-dir fixtures/preset-baseline/site tests/presentation-contract.spec.ts",
|
|
132
137
|
"test:table-layout:top": "node scripts/test-navigation.mjs --site-dir fixtures/top-navigation/site tests/table-width-top.spec.ts",
|
|
138
|
+
"test:table-sorting": "node scripts/test-navigation.mjs --site-dir fixtures/table-sorting/site tests/table-sorting.spec.ts",
|
|
133
139
|
"test:table-context:browser": "node scripts/test-navigation.mjs --site-dir fixtures/presentation-review/site tests/table-responsive-context.spec.ts",
|
|
134
140
|
"test:navigation-surfaces:browser": "npm run test:navigation-surfaces:top && npm run test:navigation-surfaces:tree",
|
|
135
141
|
"test:navigation-surfaces:top": "node scripts/test-navigation.mjs --site-dir fixtures/content-model-v2/site tests/navigation-surfaces-top.spec.ts",
|
|
@@ -161,6 +167,7 @@
|
|
|
161
167
|
"test:navigation:stress": "node scripts/test-navigation.mjs tests/navigation-stress.spec.ts",
|
|
162
168
|
"test:navigation:preview": "node scripts/test-navigation-preview.mjs",
|
|
163
169
|
"package:check": "node scripts/test-package-check.mjs",
|
|
170
|
+
"test:migration-check": "node scripts/test-migration-check.mjs",
|
|
164
171
|
"release:publish": "npm publish --access public --registry=https://registry.npmjs.org/ --cache /private/tmp/norna-npm-cache",
|
|
165
172
|
"release:patch": "node scripts/release.mjs patch",
|
|
166
173
|
"release:minor": "node scripts/release.mjs minor",
|
|
@@ -175,7 +182,9 @@
|
|
|
175
182
|
"embla-carousel": "^8.6.0",
|
|
176
183
|
"js-yaml": "^4.3.1",
|
|
177
184
|
"pagefind": "1.5.2",
|
|
178
|
-
"
|
|
185
|
+
"parse5": "7.3.0",
|
|
186
|
+
"satteri": "^0.9.1",
|
|
187
|
+
"yaml": "2.9.0"
|
|
179
188
|
},
|
|
180
189
|
"devDependencies": {
|
|
181
190
|
"@playwright/test": "^1.61.1",
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"description": "Show related choices as cards with optional images and links. Set link to make the whole card clickable.",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"items"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"layout": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Place each card image above, left, or right of its text. Defaults to image-top.",
|
|
13
|
+
"default": "image-top",
|
|
14
|
+
"enum": [
|
|
15
|
+
"image-top",
|
|
16
|
+
"image-left",
|
|
17
|
+
"image-right"
|
|
18
|
+
],
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
21
|
+
},
|
|
22
|
+
"flow": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Arrange cards as a responsive grid or a vertical stack. Defaults to grid.",
|
|
25
|
+
"default": "grid",
|
|
26
|
+
"enum": [
|
|
27
|
+
"grid",
|
|
28
|
+
"stack"
|
|
29
|
+
],
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
32
|
+
},
|
|
33
|
+
"size": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Set the coordinated card and image size. Defaults to m.",
|
|
36
|
+
"default": "m",
|
|
37
|
+
"enum": [
|
|
38
|
+
"s",
|
|
39
|
+
"m",
|
|
40
|
+
"l",
|
|
41
|
+
"xl"
|
|
42
|
+
],
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
45
|
+
},
|
|
46
|
+
"width": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Override the root theme's maximum width for this card list.",
|
|
49
|
+
"enum": [
|
|
50
|
+
"text",
|
|
51
|
+
"narrow",
|
|
52
|
+
"normal",
|
|
53
|
+
"wide"
|
|
54
|
+
],
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
57
|
+
},
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"minItems": 1,
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": [
|
|
65
|
+
"title"
|
|
66
|
+
],
|
|
67
|
+
"properties": {
|
|
68
|
+
"title": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Start another card. Every card requires a title.",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
73
|
+
},
|
|
74
|
+
"text": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Optional card text.",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"pattern": "^(?=[\\s\\S]*\\S)[^\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x9F]*$(?![\\s\\S])"
|
|
79
|
+
},
|
|
80
|
+
"image": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Optional managed image filename.",
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9.-]*\\.(?:[jJ][pP][eE]?[gG]|[pP][nN][gG]|[sS][vV][gG])$(?![\\s\\S])"
|
|
85
|
+
},
|
|
86
|
+
"link": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Optional URL opened when the card is activated.",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
91
|
+
},
|
|
92
|
+
"badge-text": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "Optional short badge displayed on the card.",
|
|
95
|
+
"minLength": 1,
|
|
96
|
+
"pattern": "^(?=.*\\S)[^\\x00-\\x1F\\x7F-\\x9F\\u2028\\u2029]+$(?![\\s\\S])"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"required": [
|
|
102
|
+
"text"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"required": [
|
|
107
|
+
"image"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"required": [
|
|
112
|
+
"link"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"$id": "https://janga.github.io/norna/schemas/card-list.schema.json",
|
|
120
|
+
"title": "Norna card-list"
|
|
121
|
+
}
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
"label": {
|
|
6
6
|
"type": "string",
|
|
7
7
|
"minLength": 1,
|
|
8
|
-
"description": "Navigation label for
|
|
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.
|
|
8
|
+
"description": "Navigation label for a group of child pages without an authored page body.",
|
|
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 (current)](https://janga.github.io/norna/reference/site/pages/#page-or-category)\n\n[Norna 0.7.27 source reference](https://github.com/janga/norna/blob/v0.7.27/site/pages/032-reference/pages/010-site/pages/020-pages/content.md#page-or-category)"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"required": [
|
|
13
13
|
"label"
|
|
14
14
|
],
|
|
15
15
|
"additionalProperties": false,
|
|
16
|
-
"description": "A
|
|
16
|
+
"description": "A navigation group without an authored page body. Opening its URL redirects when its first listed direct child is a page; otherwise it shows a generated child list.",
|
|
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`
|
|
19
|
+
"markdownDescription": "```yaml\nlabel: Guides\n```\n\n`category.yaml` groups child pages without editorial content. Its URL opens the first listed direct page, or a generated child list when the first child is a category.\n\n[Navigation category reference (current)](https://janga.github.io/norna/reference/site/pages/#page-or-category)\n\n[Norna 0.7.27 source reference](https://github.com/janga/norna/blob/v0.7.27/site/pages/032-reference/pages/010-site/pages/020-pages/content.md#page-or-category)"
|
|
20
20
|
}
|