@janga/norna 0.7.13 → 0.7.15
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/.astro/data-store.json +1 -1
- 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 +28 -28
- 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/SectionNavigationScript.astro +28 -0
- package/src/components/SiteNavigation.astro +6 -5
- package/src/components/SitePage.astro +8 -8
- package/src/components/SiteSection.astro +18 -21
- 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/src/components/MobileSectionNavigationScript.astro +0 -14
- /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
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"navigation": {
|
|
6
|
+
"description": "Site-wide navigation identity.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"label": {
|
|
10
|
+
"description": "Accessible site label used for navigation text and logo alternative text.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"markdownDescription": "```yaml\nnavigation:\n label: Example Site\n```\n\n- Without a logo, this text is shown in the navigation.\n\n- With a logo, this text becomes the image alternative text.\n\n- When omitted, Norna uses the homepage title.\n\n[Navigation identity reference](https://github.com/janga/norna/blob/v0.7.15/docs/sitewide-content.md#navigation-identity)",
|
|
14
|
+
"examples": [
|
|
15
|
+
"Example Site"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"logo": {
|
|
19
|
+
"description": "Optional display settings for a convention-based navigation logo.",
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"height": {
|
|
23
|
+
"description": "Displayed logo height. Width follows the intrinsic aspect ratio.",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^(?:0|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:px|rem|em|vw|vh|vmin|vmax|ch|%)|clamp\\(\\s*(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:px|rem|em|vw|vh|vmin|vmax|ch|%)\\s*,\\s*(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:px|rem|em|vw|vh|vmin|vmax|ch|%)\\s*,\\s*(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:px|rem|em|vw|vh|vmin|vmax|ch|%)\\s*\\))$",
|
|
26
|
+
"examples": [
|
|
27
|
+
"2rem"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"markdownDescription": "```yaml\nnavigation:\n label: Example Site\n logo:\n height: 2rem\n```\n\n`logo` optionally overrides the displayed height of the logo file that Norna discovers automatically. It does not enable or select the file.\n\n[Navigation logo filenames and placement](https://github.com/janga/norna/blob/v0.7.15/docs/public-files.md#navigation-logo)"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"markdownDescription": "```yaml\nnavigation:\n label: Example Site\n```\n\n`navigation` defines the identity shared by the homepage and every route. Routes cannot replace it.\n\n[Navigation identity reference](https://github.com/janga/norna/blob/v0.7.15/docs/sitewide-content.md#navigation-identity)"
|
|
37
|
+
},
|
|
38
|
+
"banners": {
|
|
39
|
+
"default": [],
|
|
40
|
+
"description": "Site-wide dismissible notices.",
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"id": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[a-z0-9-]+$",
|
|
48
|
+
"description": "Stable banner identifier used for dismissal state."
|
|
49
|
+
},
|
|
50
|
+
"tone": {
|
|
51
|
+
"default": "warning",
|
|
52
|
+
"description": "Semantic banner tone.",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"oneOf": [
|
|
55
|
+
{
|
|
56
|
+
"const": "warning",
|
|
57
|
+
"title": "Warning",
|
|
58
|
+
"description": "Present the banner as an important warning notice."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"visible": {
|
|
63
|
+
"description": "Optional date window for the banner.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"from": {
|
|
67
|
+
"description": "First date on which the content is visible.",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
70
|
+
},
|
|
71
|
+
"until": {
|
|
72
|
+
"description": "First date on which the content is no longer visible.",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
"title": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "Short banner heading."
|
|
83
|
+
},
|
|
84
|
+
"text": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "Concise banner message."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"id",
|
|
92
|
+
"title",
|
|
93
|
+
"text"
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"description": "Dismissible, site-wide one-line notice."
|
|
97
|
+
},
|
|
98
|
+
"markdownDescription": "```yaml\nbanners:\n - id: project-status\n tone: warning\n title: Experimental code\n text: Not for production use.\n```\n\nAdds dismissible notices above page content. List order controls their presentation order; each `id` must be unique.\n\n[Banner reference](https://github.com/janga/norna/blob/v0.7.15/docs/sitewide-content.md#banners)"
|
|
99
|
+
},
|
|
100
|
+
"footer": {
|
|
101
|
+
"description": "Site-wide footer content.",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"copyrightMessage": {
|
|
105
|
+
"description": "Copyright or ownership text shown in the site footer.",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1
|
|
108
|
+
},
|
|
109
|
+
"buildInfo": {
|
|
110
|
+
"description": "Optional generated build timestamp.",
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"enabled": {
|
|
114
|
+
"default": true,
|
|
115
|
+
"description": "Show generated build information in the footer.",
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"text": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1,
|
|
121
|
+
"description": "Label shown before the generated build timestamp."
|
|
122
|
+
},
|
|
123
|
+
"dateTimeFormat": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"locale": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 1,
|
|
129
|
+
"description": "Intl locale such as en-GB or sv-SE."
|
|
130
|
+
},
|
|
131
|
+
"timeZone": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1,
|
|
134
|
+
"description": "IANA time zone such as Europe/Stockholm."
|
|
135
|
+
},
|
|
136
|
+
"dateStyle": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "Intl dateStyle for the build timestamp.",
|
|
139
|
+
"oneOf": [
|
|
140
|
+
{
|
|
141
|
+
"const": "short",
|
|
142
|
+
"title": "Short",
|
|
143
|
+
"description": "Use a compact localized date or time representation."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"const": "medium",
|
|
147
|
+
"title": "Medium",
|
|
148
|
+
"description": "Use a moderately detailed localized representation."
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"const": "long",
|
|
152
|
+
"title": "Long",
|
|
153
|
+
"description": "Use a detailed localized representation."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"const": "full",
|
|
157
|
+
"title": "Full",
|
|
158
|
+
"description": "Use the most detailed localized representation."
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"timeStyle": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Intl timeStyle for the build timestamp.",
|
|
165
|
+
"oneOf": [
|
|
166
|
+
{
|
|
167
|
+
"const": "short",
|
|
168
|
+
"title": "Short",
|
|
169
|
+
"description": "Use a compact localized date or time representation."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"const": "medium",
|
|
173
|
+
"title": "Medium",
|
|
174
|
+
"description": "Use a moderately detailed localized representation."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"const": "long",
|
|
178
|
+
"title": "Long",
|
|
179
|
+
"description": "Use a detailed localized representation."
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"const": "full",
|
|
183
|
+
"title": "Full",
|
|
184
|
+
"description": "Use the most detailed localized representation."
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"required": [
|
|
190
|
+
"locale",
|
|
191
|
+
"timeZone",
|
|
192
|
+
"dateStyle",
|
|
193
|
+
"timeStyle"
|
|
194
|
+
],
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"description": "Formatting used for the generated build timestamp."
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": [
|
|
200
|
+
"text",
|
|
201
|
+
"dateTimeFormat"
|
|
202
|
+
],
|
|
203
|
+
"additionalProperties": false
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"additionalProperties": false,
|
|
207
|
+
"markdownDescription": "```yaml\nfooter:\n copyrightMessage: Copyright Example Owner.\n```\n\nAdds shared footer content. Generated build information is optional.\n\n[Footer reference](https://github.com/janga/norna/blob/v0.7.15/docs/sitewide-content.md#footer)"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"description": "Editorial content and identity shared by every page.",
|
|
212
|
+
"$id": "https://janga.github.io/norna/schemas/sitewide-content.schema.json",
|
|
213
|
+
"title": "Norna site-wide content",
|
|
214
|
+
"markdownDescription": "```yaml\nnavigation:\n label: Example Site\n```\n\n`sitewide-content.yaml` optionally defines editorial content and identity shared by every page.\n\n[Site-wide content reference](https://github.com/janga/norna/blob/v0.7.15/docs/sitewide-content.md)"
|
|
215
|
+
}
|