@janga/norna 0.7.0 → 0.7.2
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 -4
- package/astro.config.mjs +2 -0
- package/bin/norna-cli.mjs +170 -0
- package/bin/norna.mjs +149 -150
- package/docs/README.md +36 -16
- package/docs/commands.md +18 -5
- package/docs/configuration.md +37 -2
- package/docs/content.md +98 -257
- package/docs/{command-organization.md → design/command-organization.md} +9 -5
- package/docs/{site-examples-structure-note.md → design/site-examples-structure.md} +17 -22
- package/docs/engine-development.md +33 -5
- package/docs/getting-started.md +40 -4
- package/docs/local-development.md +13 -0
- package/docs/publishing.md +23 -0
- package/docs/routes.md +90 -0
- package/docs/site-structure.md +15 -8
- package/docs/theme.md +150 -0
- package/docs/typography.md +125 -0
- package/examples/dog-gallery/site/.norna/generated-images.json +226 -0
- package/examples/dog-gallery/site/config.mjs +97 -0
- package/examples/dog-gallery/site/content.md +146 -0
- package/examples/dog-gallery/site/images/black-dogs/black-puppy-meadow.png +0 -0
- package/examples/dog-gallery/site/images/black-dogs/photo-of-a-black-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/brown-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/brown-dogs/dog-accompanies-master.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/golden-retriever.jpg +0 -0
- package/examples/dog-gallery/site/images/golden-dogs/toller-puppy.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-cute-dog.jpg +0 -0
- package/examples/dog-gallery/site/images/white-dogs/white-puppy-garden.png +0 -0
- package/examples/dog-gallery/site/public/favicon.svg +7 -0
- package/examples/dog-gallery/site/public/robots.txt +2 -0
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +35 -0
- package/examples/dog-gallery/site/theme.md +55 -0
- package/fixtures/basic/site/config.mjs +1 -0
- package/package.json +8 -7
- package/scripts/check-config.mjs +1 -0
- package/scripts/dev-local.mjs +64 -15
- package/scripts/init-site.mjs +1 -1
- package/scripts/lib/project-config.mjs +22 -0
- package/scripts/lib/site-content.mjs +2 -1
- package/scripts/lib/site-paths.mjs +18 -3
- package/scripts/lib/typography.mjs +5 -5
- package/scripts/show-typography.mjs +252 -29
- package/scripts/test-cli-discovery.mjs +124 -0
- package/scripts/test-engine-commands.mjs +18 -4
- package/scripts/test-navigation.mjs +10 -6
- package/scripts/test-package-check.mjs +32 -4
- package/src/components/SiteNavigation.astro +7 -5
- package/src/components/SitePage.astro +3 -0
- package/src/components/SiteSection.astro +24 -24
- package/src/content.config.ts +4 -0
- package/src/layouts/BaseLayout.astro +2 -1
- package/src/lib/basePath.ts +21 -0
- package/src/lib/generatedImages.ts +8 -4
- package/src/lib/sectionContent.ts +6 -1
- package/src/lib/sitePublicAssets.ts +8 -1
- package/src/styles/global.css +8 -8
- package/starters/basic/.github/workflows/deploy.yml +3 -3
- package/starters/basic/README.md +21 -0
- package/starters/basic/package.json +1 -1
- package/starters/basic/site/config.mjs +1 -0
- package/starters/basic/site/content.md +5 -3
- package/starters/basic/site/theme.md +4 -0
package/src/styles/global.css
CHANGED
|
@@ -342,7 +342,7 @@ h1,
|
|
|
342
342
|
h2 {
|
|
343
343
|
margin-bottom: 0;
|
|
344
344
|
color: inherit;
|
|
345
|
-
font-size: var(--section-heading-font-size-desktop, clamp(1.
|
|
345
|
+
font-size: var(--section-heading-font-size-desktop, clamp(1.35rem, 1.1rem + 0.9vw, 2rem));
|
|
346
346
|
font-weight: 400;
|
|
347
347
|
letter-spacing: 0;
|
|
348
348
|
line-height: var(--section-heading-line-height, 1.04);
|
|
@@ -351,7 +351,7 @@ h2 {
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
.site-section-primary h1 {
|
|
354
|
-
font-size: var(--section-heading-font-size-desktop, clamp(1.
|
|
354
|
+
font-size: var(--section-heading-font-size-desktop, clamp(1.6rem, 1.22rem + 1.45vw, 2.75rem));
|
|
355
355
|
font-weight: 700;
|
|
356
356
|
}
|
|
357
357
|
|
|
@@ -360,13 +360,13 @@ h2 {
|
|
|
360
360
|
margin: 0 auto;
|
|
361
361
|
color: inherit;
|
|
362
362
|
font-family: var(--font-sans);
|
|
363
|
-
font-size: clamp(
|
|
363
|
+
font-size: clamp(0.96rem, 0.94rem + 0.08vw, 1rem);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
.section-markdown {
|
|
367
367
|
width: min(100%, var(--section-body-width-desktop, var(--text-width)));
|
|
368
368
|
margin: 0 auto var(--space-section-body-to-gallery);
|
|
369
|
-
font-size: var(--section-body-font-size-desktop, clamp(
|
|
369
|
+
font-size: var(--section-body-font-size-desktop, clamp(0.96rem, 0.94rem + 0.08vw, 1rem));
|
|
370
370
|
line-height: var(--section-body-line-height, 1.78);
|
|
371
371
|
text-align: var(--section-body-align-desktop, center);
|
|
372
372
|
}
|
|
@@ -402,7 +402,7 @@ h2 {
|
|
|
402
402
|
.section-markdown h4 {
|
|
403
403
|
margin: 0 0 0.85rem;
|
|
404
404
|
color: inherit;
|
|
405
|
-
font-size: clamp(0.
|
|
405
|
+
font-size: clamp(0.96rem, 0.94rem + 0.08vw, 1rem);
|
|
406
406
|
font-weight: 400;
|
|
407
407
|
letter-spacing: 0.02em;
|
|
408
408
|
line-height: 1.5;
|
|
@@ -784,14 +784,14 @@ h2 {
|
|
|
784
784
|
h2 {
|
|
785
785
|
font-size: var(
|
|
786
786
|
--section-heading-font-size-mobile,
|
|
787
|
-
var(--section-heading-font-size-desktop, clamp(1.
|
|
787
|
+
var(--section-heading-font-size-desktop, clamp(1.3rem, 1.05rem + 1.35vw, 1.75rem))
|
|
788
788
|
);
|
|
789
789
|
}
|
|
790
790
|
|
|
791
791
|
.site-section-primary h1 {
|
|
792
792
|
font-size: var(
|
|
793
793
|
--section-heading-font-size-mobile,
|
|
794
|
-
var(--section-heading-font-size-desktop, clamp(1.
|
|
794
|
+
var(--section-heading-font-size-desktop, clamp(1.5rem, 1.12rem + 2vw, 2.25rem))
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
|
|
@@ -804,7 +804,7 @@ h2 {
|
|
|
804
804
|
width: min(100%, var(--section-body-width-mobile, var(--section-body-width-desktop, var(--text-width))));
|
|
805
805
|
font-size: var(
|
|
806
806
|
--section-body-font-size-mobile,
|
|
807
|
-
var(--section-body-font-size-desktop, clamp(
|
|
807
|
+
var(--section-body-font-size-desktop, clamp(0.96rem, 0.94rem + 0.08vw, 1rem))
|
|
808
808
|
);
|
|
809
809
|
text-align: var(--section-body-align-mobile, var(--section-body-align-desktop, left));
|
|
810
810
|
}
|
|
@@ -34,10 +34,10 @@ jobs:
|
|
|
34
34
|
- name: Restore generated images
|
|
35
35
|
uses: actions/cache@v4
|
|
36
36
|
with:
|
|
37
|
-
path: site/.
|
|
38
|
-
key:
|
|
37
|
+
path: site/.norna/public/images/generated
|
|
38
|
+
key: norna-images-${{ hashFiles('site/.norna/generated-images.json') }}
|
|
39
39
|
restore-keys: |
|
|
40
|
-
|
|
40
|
+
norna-images-
|
|
41
41
|
|
|
42
42
|
- name: Install dependencies
|
|
43
43
|
run: npm ci
|
package/starters/basic/README.md
CHANGED
|
@@ -9,11 +9,29 @@ npm install
|
|
|
9
9
|
npm run norna:dev
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
If the standard local port is blocked, start with:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm run dev -- --kill
|
|
16
|
+
```
|
|
17
|
+
|
|
12
18
|
Edit site-wide theme defaults in `site/theme.md`, homepage content and section
|
|
13
19
|
overrides in `site/content.md`, technical settings such as URL, layout, font,
|
|
14
20
|
and locale labels in `site/config.mjs`, source images under
|
|
15
21
|
`site/images/<section-id>/`, and static public files under `site/public/`.
|
|
16
22
|
|
|
23
|
+
Use `site.basePath: '/'` for a custom domain or root-hosted site. For a GitHub
|
|
24
|
+
Pages project site without a custom domain, set both values:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
site: {
|
|
28
|
+
url: 'https://owner.github.io/repository-name/',
|
|
29
|
+
basePath: '/repository-name/',
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
In GitHub repository settings, configure Pages to build from GitHub Actions.
|
|
34
|
+
|
|
17
35
|
The page width is configured with `layout.pageWidth`; gallery width is
|
|
18
36
|
configured with `gallery.width`. Side margins are configured with
|
|
19
37
|
`layout.gutter`; image height is limited with
|
|
@@ -49,6 +67,9 @@ Generic documentation lives in the `norna` repository:
|
|
|
49
67
|
- `docs/getting-started.md`
|
|
50
68
|
- `docs/site-structure.md`
|
|
51
69
|
- `docs/content.md`
|
|
70
|
+
- `docs/theme.md`
|
|
71
|
+
- `docs/typography.md`
|
|
72
|
+
- `docs/routes.md`
|
|
52
73
|
- `docs/configuration.md`
|
|
53
74
|
- `docs/commands.md`
|
|
54
75
|
- `docs/images-and-metadata.md`
|
|
@@ -9,12 +9,14 @@ sections:
|
|
|
9
9
|
gallery: []
|
|
10
10
|
- id: work
|
|
11
11
|
gallery: []
|
|
12
|
-
|
|
13
12
|
---
|
|
13
|
+
|
|
14
14
|
## Intro {#intro}
|
|
15
15
|
|
|
16
|
-
This is a minimal starter site for norna.
|
|
17
|
-
|
|
16
|
+
This is a minimal starter site for norna. Since this site doesn't have any
|
|
17
|
+
routes defined, the navigation menu will be a sticky bar with anchor links for
|
|
18
|
+
ease of use on phones etc. [Highlighted inline text]{.highlight} when a short
|
|
19
|
+
phrase needs emphasis
|
|
18
20
|
|
|
19
21
|
## Work {#work}
|
|
20
22
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
# Active values below are ordinary YAML; this marked comment block is only help text.
|
|
5
5
|
#
|
|
6
6
|
# Available structure:
|
|
7
|
+
# navigation:
|
|
8
|
+
# brand: site-wide brand/home text; defaults to the homepage title
|
|
7
9
|
# presentation:
|
|
8
10
|
# backgroundColor: quoted hex color, e.g. "#000000"
|
|
9
11
|
# textColor: quoted hex color, e.g. "#f7f4ee"
|
|
@@ -40,6 +42,8 @@
|
|
|
40
42
|
# backgroundColor: quoted hex color
|
|
41
43
|
# textColor: quoted hex color
|
|
42
44
|
# norna:end theme-help
|
|
45
|
+
navigation:
|
|
46
|
+
brand: Example Gallery
|
|
43
47
|
presentation:
|
|
44
48
|
backgroundColor: "#000000"
|
|
45
49
|
textColor: "#f7f4ee"
|