@janga/norna 0.7.26 → 0.7.28

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.
Files changed (110) hide show
  1. package/README.md +51 -35
  2. package/astro.config.mjs +19 -1
  3. package/bin/norna-cli.mjs +6 -4
  4. package/package.json +9 -5
  5. package/schemas/card-list.schema.json +1 -1
  6. package/schemas/config.schema.json +66 -66
  7. package/schemas/content-frontmatter.schema.json +17 -8
  8. package/schemas/manifest.json +49 -3
  9. package/schemas/page-theme.schema.json +1585 -41
  10. package/schemas/root-theme.schema.json +1767 -0
  11. package/schemas/sitewide-content.schema.json +18 -18
  12. package/schemas/theme.schema.json +243 -243
  13. package/scripts/add-site-node.mjs +13 -161
  14. package/scripts/build-site.mjs +11 -6
  15. package/scripts/check-config.mjs +7 -23
  16. package/scripts/dev-local.mjs +17 -10
  17. package/scripts/export-theme-preset.mjs +2 -2
  18. package/scripts/generate-images.mjs +7 -6
  19. package/scripts/generate-schemas.mjs +9 -6
  20. package/scripts/lib/category-destinations.mjs +13 -12
  21. package/scripts/lib/documentation-links.mjs +33 -2
  22. package/scripts/lib/documentation-routes.json +229 -0
  23. package/scripts/lib/docusaurus-migration-audit.mjs +9 -6
  24. package/scripts/lib/editor-file-policy.mjs +18 -0
  25. package/scripts/lib/editor-language-service.mjs +53 -55
  26. package/scripts/lib/editor-page-addresses.mjs +55 -0
  27. package/scripts/lib/editor-page-placement.mjs +172 -0
  28. package/scripts/lib/editor-site-editing-tree.mjs +146 -0
  29. package/scripts/lib/editor-site-files.mjs +153 -0
  30. package/scripts/lib/editor-site-links.mjs +79 -0
  31. package/scripts/lib/editor-site-tree.mjs +151 -0
  32. package/scripts/lib/editor-source-files.mjs +87 -0
  33. package/scripts/lib/editor-theme-help.mjs +43 -0
  34. package/scripts/lib/locale-registry.mjs +1 -1
  35. package/scripts/lib/locales/en.mjs +1 -1
  36. package/scripts/lib/navigation-model.mjs +2 -44
  37. package/scripts/lib/navigation-review.mjs +14 -50
  38. package/scripts/lib/norna-markdown-blocks.mjs +1 -1
  39. package/scripts/lib/page-aliases.mjs +3 -1
  40. package/scripts/lib/page-model.mjs +39 -20
  41. package/scripts/lib/page-move-apply.mjs +117 -0
  42. package/scripts/lib/page-move-plan.mjs +27 -59
  43. package/scripts/lib/presentation.mjs +3 -3
  44. package/scripts/lib/project-config.mjs +7 -8
  45. package/scripts/lib/schema-definitions.mjs +12 -39
  46. package/scripts/lib/schema-editor-metadata.mjs +12 -59
  47. package/scripts/lib/schema-value-definitions.mjs +1 -1
  48. package/scripts/lib/site-content.mjs +7 -24
  49. package/scripts/lib/site-conventions.mjs +19 -1
  50. package/scripts/lib/site-navigation-tree.mjs +2 -7
  51. package/scripts/lib/site-node-create.mjs +169 -0
  52. package/scripts/lib/site-paths.mjs +22 -10
  53. package/scripts/lib/site-structure.mjs +72 -82
  54. package/scripts/lib/site-upgrade.mjs +30 -0
  55. package/scripts/lib/source-files.mjs +34 -0
  56. package/scripts/lib/theme-config.mjs +26 -68
  57. package/scripts/lib/theme-packages.mjs +47 -0
  58. package/scripts/lib/theme-presets.mjs +20 -53
  59. package/scripts/lib/typography.mjs +2 -2
  60. package/scripts/lib/yaml-config.mjs +1 -1
  61. package/scripts/lib/yaml-source-edit.mjs +94 -0
  62. package/scripts/move-site-page.mjs +3 -124
  63. package/scripts/show-typography.mjs +32 -17
  64. package/scripts/sync-content-sections.mjs +9 -7
  65. package/scripts/sync-site-public.mjs +1 -1
  66. package/scripts/upgrade-site.mjs +17 -0
  67. package/src/components/AreaNavigationMenu.astro +24 -0
  68. package/src/components/AreaNavigationPanel.astro +55 -0
  69. package/src/components/AreaNavigationSwitcher.astro +30 -0
  70. package/src/components/ImageStackEnhancement.astro +0 -7
  71. package/src/components/NavigationContinuity.astro +26 -0
  72. package/src/components/NavigationPageTree.astro +13 -4
  73. package/src/components/NavigationState.astro +11 -0
  74. package/src/components/NavigationTreeControls.astro +3 -2
  75. package/src/components/PageAliasRedirect.astro +44 -3
  76. package/src/components/SearchPage.astro +9 -1
  77. package/src/components/SectionNavigationScript.astro +106 -26
  78. package/src/components/SiteNavigation.astro +45 -20
  79. package/src/components/SitePage.astro +37 -61
  80. package/src/components/SiteTreeNavigation.astro +38 -18
  81. package/src/components/TopPageMenu.astro +4 -3
  82. package/src/components/TreeNavigationScript.astro +50 -57
  83. package/src/content.config.ts +15 -16
  84. package/src/layouts/BaseLayout.astro +15 -39
  85. package/src/lib/areaNavigation.ts +42 -0
  86. package/src/lib/navigationContinuity.ts +212 -0
  87. package/src/lib/navigationFollowing.ts +28 -18
  88. package/src/lib/navigationState.mjs +88 -0
  89. package/src/lib/navigationStateScript.mjs +76 -0
  90. package/src/lib/navigationVisibility.ts +9 -0
  91. package/src/lib/pageThemes.ts +5 -42
  92. package/src/lib/sectionContent.ts +3 -2
  93. package/src/lib/siteNavigation.ts +6 -0
  94. package/src/lib/sitePages.ts +12 -23
  95. package/src/pages/404.astro +1 -1
  96. package/src/pages/[...slug].astro +5 -15
  97. package/src/pages/index.astro +1 -3
  98. package/src/styles/area-navigation.css +399 -0
  99. package/src/styles/content.css +5 -31
  100. package/src/styles/navigation-continuity.css +163 -0
  101. package/src/styles/page-layout.css +57 -68
  102. package/src/styles/responsive.css +0 -4
  103. package/starters/basic/README.md +10 -9
  104. package/starters/basic/site/{pages/000-home → root}/content.md +2 -2
  105. package/schemas/category.schema.json +0 -20
  106. package/src/components/PageContentsNavigation.astro +0 -20
  107. /package/starters/basic/site/{pages/000-home → root}/images/.gitkeep +0 -0
  108. /package/starters/basic/site/{theme.yaml → root/tree-theme.yaml} +0 -0
  109. /package/starters/basic/site/{config.yaml → site-config/settings.yaml} +0 -0
  110. /package/starters/basic/site/{sitewide-content.yaml → site-config/shared-content.yaml} +0 -0
@@ -6,14 +6,23 @@
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "description": {
9
- "description": "Optional page-specific meta description.",
9
+ "description": "Page description used in metadata, social previews and generated child-page lists.",
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.26/docs/content.md#page-title-and-frontmatter)",
12
+ "markdownDescription": "```yaml\npage:\n description: About this project.\n```\n\nA page-specific description used in metadata and social previews. Generated child-page lists can show it beside the page title; it is not inserted into the page body.\n\n[Page title and frontmatter reference (current)](https://janga.github.io/norna/reference/site/metadata/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/040-metadata/content.md)",
13
13
  "examples": [
14
14
  "About this project."
15
15
  ]
16
16
  },
17
+ "listChildren": {
18
+ "description": "Append links to every listed direct child page after this page's authored content.",
19
+ "type": "boolean",
20
+ "markdownDescription": "```yaml\npage:\n listChildren: true\n```\n\nAppend links to every listed direct child page after this page's authored content.\n\n[Read the relevant reference (current)](https://janga.github.io/norna/reference/site/pages/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/020-pages/content.md)",
21
+ "examples": [
22
+ true,
23
+ false
24
+ ]
25
+ },
17
26
  "aliases": {
18
27
  "description": "Previous site-relative URLs that permanently identify this page. The current page is always the target.",
19
28
  "minItems": 1,
@@ -22,12 +31,12 @@
22
31
  "type": "string",
23
32
  "pattern": "^\\/(?:[a-z0-9]+(?:-[a-z0-9]+)*\\/)+$",
24
33
  "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.26/docs/pages.md#preserve-old-page-urls)",
34
+ "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 (current)](https://janga.github.io/norna/reference/site/urls/#keep-an-old-url)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/030-urls/content.md#keep-an-old-url)",
26
35
  "examples": [
27
36
  "/old-about/"
28
37
  ]
29
38
  },
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.26/docs/pages.md#preserve-old-page-urls)",
39
+ "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 (current)](https://janga.github.io/norna/reference/site/urls/#keep-an-old-url)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/030-urls/content.md#keep-an-old-url)",
31
40
  "examples": [
32
41
  [
33
42
  "/old-about/"
@@ -37,7 +46,7 @@
37
46
  },
38
47
  "additionalProperties": false,
39
48
  "description": "Optional metadata for this homepage or additional page. The Markdown H1 supplies the page title.",
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.26/docs/content.md#page-title-and-frontmatter)"
49
+ "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 (current)](https://janga.github.io/norna/reference/site/metadata/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/040-metadata/content.md)"
41
50
  },
42
51
  "navigation": {
43
52
  "description": "Optional navigation metadata for this page.",
@@ -47,7 +56,7 @@
47
56
  "default": true,
48
57
  "description": "List this page in site navigation. The page remains public when false.",
49
58
  "type": "boolean",
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.26/docs/pages.md#navigation)",
59
+ "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 (current)](https://janga.github.io/norna/reference/configuration/navigation/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/020-configuration/pages/030-navigation/content.md)",
51
60
  "examples": [
52
61
  true,
53
62
  false
@@ -55,12 +64,12 @@
55
64
  }
56
65
  },
57
66
  "additionalProperties": false,
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.26/docs/pages.md#navigation)"
67
+ "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 (current)](https://janga.github.io/norna/reference/configuration/navigation/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/020-configuration/pages/030-navigation/content.md)"
59
68
  }
60
69
  },
61
70
  "additionalProperties": false,
62
71
  "description": "Frontmatter for a homepage or additional page content.md file.",
63
72
  "$id": "https://janga.github.io/norna/schemas/content-frontmatter.schema.json",
64
73
  "title": "Norna page frontmatter",
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.26/docs/content.md#page-title-and-frontmatter)"
74
+ "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 (current)](https://janga.github.io/norna/reference/site/metadata/)\n\n[Norna 0.7.28 source reference](https://github.com/janga/norna/blob/v0.7.28/site/root/pages/032-reference/pages/010-site/pages/040-metadata/content.md)"
66
75
  }
@@ -1,17 +1,63 @@
1
1
  {
2
- "editorApiVersion": 2,
3
- "schemaVersion": 3,
2
+ "editorApiVersion": 3,
3
+ "schemaVersion": 6,
4
+ "sourceFiles": [
5
+ {
6
+ "name": "settings.yaml",
7
+ "location": "site-config",
8
+ "schemaKind": "config",
9
+ "required": true,
10
+ "input": "url",
11
+ "description": "Required public URL and technical site settings."
12
+ },
13
+ {
14
+ "name": "shared-content.yaml",
15
+ "location": "site-config",
16
+ "schemaKind": "sitewideContent",
17
+ "text": "banners: []\n",
18
+ "description": "Shared notices and footer content for the complete site.",
19
+ "removalEffect": "Shared notices, authored footer content and logo display settings in this file will be removed from the whole site."
20
+ },
21
+ {
22
+ "name": "content.md",
23
+ "location": "page",
24
+ "schemaKind": "contentFrontmatter",
25
+ "required": true,
26
+ "input": "title",
27
+ "description": "Required page content."
28
+ },
29
+ {
30
+ "name": "tree-theme.yaml",
31
+ "location": "page",
32
+ "schemaKind": "theme",
33
+ "rootSchemaKind": "rootTheme",
34
+ "required": "root",
35
+ "rootText": "preset: documentation\n",
36
+ "text": "# Modify inherited settings. Add preset only to replace the complete base.\n{}\n",
37
+ "description": "Visual settings for this page and its descendants. Without preset, modifies inherited values; preset selects a new base. Required on the root page.",
38
+ "removalEffect": "This branch resumes the ancestor tree theme. Overrides on descendants remain; a descendant preset starts an independent base."
39
+ },
40
+ {
41
+ "name": "page-theme.yaml",
42
+ "location": "page",
43
+ "schemaKind": "pageTheme",
44
+ "text": "# Modify this page only. Add preset only to replace the complete base.\n{}\n",
45
+ "description": "Visual settings for this page only. Without preset, modifies its tree theme; preset selects a new base. Descendants keep their tree theme.",
46
+ "removalEffect": "This page will use its selected tree theme again. Other pages are unchanged."
47
+ }
48
+ ],
49
+ "pageDirectoryPattern": "^(?!000-)(\\d{3})-([a-z0-9]+(?:-[a-z0-9]+)*)$",
4
50
  "blockSchemas": {
5
51
  "image-stack": "image-stack.schema.json",
6
52
  "image-carousel": "image-carousel.schema.json",
7
53
  "card-list": "card-list.schema.json"
8
54
  },
9
55
  "files": {
10
- "category": "category.schema.json",
11
56
  "config": "config.schema.json",
12
57
  "contentFrontmatter": "content-frontmatter.schema.json",
13
58
  "sitewideContent": "sitewide-content.schema.json",
14
59
  "theme": "theme.schema.json",
60
+ "rootTheme": "root-theme.schema.json",
15
61
  "pageTheme": "page-theme.schema.json"
16
62
  }
17
63
  }