@janga/norna 0.7.2 → 0.7.4
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 +16 -16
- package/bin/norna-cli.mjs +12 -7
- package/docs/README.md +11 -12
- package/docs/commands.md +9 -9
- package/docs/configuration.md +14 -145
- package/docs/content.md +17 -15
- package/docs/design/command-organization.md +58 -57
- package/docs/design/site-examples-structure.md +6 -5
- package/docs/engine-development.md +5 -5
- package/docs/getting-started.md +20 -26
- package/docs/images-and-metadata.md +1 -1
- package/docs/local-development.md +2 -2
- package/docs/publishing.md +1 -1
- package/docs/routes.md +2 -2
- package/docs/site-structure.md +8 -7
- package/docs/theme.md +133 -7
- package/docs/typography.md +78 -43
- package/examples/dog-gallery/node_modules/.vite/deps/_metadata.json +74 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro-D_GIpJIE.js +434 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro-D_GIpJIE.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_axobject-query.js +2702 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
- package/examples/dog-gallery/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/audit-DM9Hkl5B.js +1534 -0
- package/examples/dog-gallery/node_modules/.vite/deps/audit-DM9Hkl5B.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/highlight-DnZ1ULOL.js +48 -0
- package/examples/dog-gallery/node_modules/.vite/deps/highlight-DnZ1ULOL.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/icons-RyebKi45.js +42 -0
- package/examples/dog-gallery/node_modules/.vite/deps/icons-RyebKi45.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/package.json +3 -0
- package/examples/dog-gallery/node_modules/.vite/deps/rolldown-runtime-BvCyGRYZ.js +4 -0
- package/examples/dog-gallery/node_modules/.vite/deps/settings-DaU-gNnK.js +190 -0
- package/examples/dog-gallery/node_modules/.vite/deps/settings-DaU-gNnK.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/toolbar-63PA619H.js +458 -0
- package/examples/dog-gallery/node_modules/.vite/deps/toolbar-63PA619H.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/ui-library--bkcNSYz.js +1016 -0
- package/examples/dog-gallery/node_modules/.vite/deps/ui-library--bkcNSYz.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/window-jPkpKVcy.js +32 -0
- package/examples/dog-gallery/node_modules/.vite/deps/window-jPkpKVcy.js.map +1 -0
- package/examples/dog-gallery/node_modules/.vite/deps/xray-BXCHpEJP.js +111 -0
- package/examples/dog-gallery/node_modules/.vite/deps/xray-BXCHpEJP.js.map +1 -0
- package/examples/dog-gallery/site/config.mjs +12 -42
- package/examples/dog-gallery/site/content.md +28 -6
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +17 -3
- package/examples/dog-gallery/site/theme.md +83 -26
- package/fixtures/basic/site/config.mjs +2 -22
- package/fixtures/basic/site/content.md +1 -1
- package/fixtures/basic/site/theme.md +7 -3
- package/package.json +3 -3
- package/scripts/check-config.mjs +4 -3
- package/scripts/deploy-site.mjs +3 -3
- package/scripts/init-site.mjs +10 -8
- package/scripts/lib/frontmatter-yaml.mjs +85 -0
- package/scripts/lib/presentation.mjs +10 -11
- package/scripts/lib/project-config.mjs +146 -45
- package/scripts/lib/site-content.mjs +21 -3
- package/scripts/lib/theme-config.mjs +34 -0
- package/scripts/lib/typography.mjs +155 -35
- package/scripts/show-typography.mjs +127 -159
- package/scripts/sync-content-sections.mjs +6 -6
- package/scripts/test-content-check.mjs +3 -4
- package/scripts/test-engine-commands.mjs +21 -3
- package/scripts/test-package-check.mjs +34 -17
- package/scripts/test-temporary-visibility.mjs +2 -3
- package/src/components/SitePage.astro +2 -3
- package/src/components/SiteSection.astro +115 -19
- package/src/content.config.ts +66 -6
- package/src/layouts/BaseLayout.astro +11 -0
- package/src/styles/global.css +83 -52
- package/starters/basic/README.md +11 -15
- package/starters/basic/package.json +2 -2
- package/starters/basic/site/config.mjs +3 -24
- package/starters/basic/site/content.md +40 -7
- package/starters/basic/site/theme.md +84 -18
- package/starters/project/.github/workflows/deploy.yml +65 -0
- package/starters/project/README.md +72 -0
- package/starters/project/package-lock.json +4296 -0
- package/starters/project/package.json +35 -0
- package/starters/project/site/config.mjs +43 -0
- package/starters/project/site/content.md +128 -0
- package/starters/project/site/public/robots.txt +2 -0
- package/starters/project/site/routes/guide/route-content.md +85 -0
- package/starters/project/site/theme.md +43 -0
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Example
|
|
2
|
+
title: Example Site
|
|
3
3
|
description: Minimal norna starter site.
|
|
4
4
|
sections:
|
|
5
5
|
- id: intro
|
|
6
6
|
presentation:
|
|
7
7
|
typography:
|
|
8
8
|
preset: statement
|
|
9
|
-
gallery: []
|
|
10
9
|
- id: work
|
|
11
|
-
|
|
10
|
+
- id: lorem1
|
|
11
|
+
- id: lorem2
|
|
12
|
+
- id: lorem3
|
|
13
|
+
|
|
12
14
|
---
|
|
13
15
|
|
|
14
16
|
## Intro {#intro}
|
|
15
|
-
|
|
16
17
|
This is a minimal starter site for norna. Since this site doesn't have any
|
|
17
18
|
routes defined, the navigation menu will be a sticky bar with anchor links for
|
|
18
19
|
ease of use on phones etc. [Highlighted inline text]{.highlight} when a short
|
|
19
20
|
phrase needs emphasis
|
|
20
|
-
|
|
21
21
|
## Work {#work}
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
Add image rows in frontmatter and matching source images under images/work/.
|
|
23
|
+
## What is Lorem Ipsum? {#lorem1}
|
|
24
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting
|
|
25
|
+
industry. Lorem Ipsum has been the industry's standard dummy text ever
|
|
26
|
+
since 1966, when designers at Letraset and James Mosley, the librarian
|
|
27
|
+
at St Bride Printing Library in London, took a 1914 Cicero translation
|
|
28
|
+
and scrambled it to make dummy text for Letraset's Body Type
|
|
29
|
+
sheets. It has survived not only many decades, but also the leap into
|
|
30
|
+
electronic typesetting, remaining essentially unchanged. It was
|
|
31
|
+
popularised thanks to these sheets and more recently with desktop
|
|
32
|
+
publishing software like Aldus PageMaker and Microsoft Word including
|
|
33
|
+
versions of Lorem Ipsum.
|
|
34
|
+
## Why do we use it? {#lorem2}
|
|
35
|
+
It is a long established fact that a reader will be distracted by the
|
|
36
|
+
readable content of a page when looking at its layout. The point of
|
|
37
|
+
using Lorem Ipsum is that it has a more-or-less normal distribution of
|
|
38
|
+
letters, as opposed to using 'Content here, content here', making it
|
|
39
|
+
look like readable English. Many desktop publishing packages and web
|
|
40
|
+
page editors now use Lorem Ipsum as their default model text, and a
|
|
41
|
+
search for 'lorem ipsum' will uncover many web sites still in their
|
|
42
|
+
infancy. Various versions have evolved over the years, sometimes by
|
|
43
|
+
accident, sometimes on purpose (injected humour and the like).
|
|
44
|
+
## Where does it come from? {#lorem3}
|
|
45
|
+
Contrary to popular belief, Lorem Ipsum is not simply random text. It
|
|
46
|
+
has roots in a piece of classical Latin literature from 45 BC, making
|
|
47
|
+
it over 2000 years old. Richard McClintock, a Latin professor at
|
|
48
|
+
Hampden-Sydney College in Virginia, looked up one of the more obscure
|
|
49
|
+
Latin words, consectetur, from a Lorem Ipsum passage, and going
|
|
50
|
+
through the cites of the word in classical literature, discovered the
|
|
51
|
+
undoubtable source. Lorem Ipsum comes from sections 1.10.32 and
|
|
52
|
+
1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and
|
|
53
|
+
Evil) by Cicero, written in 45 BC. This book is a treatise on the
|
|
54
|
+
theory of ethics, very popular during the Renaissance. The first line
|
|
55
|
+
of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in
|
|
56
|
+
section 1.10.32
|
|
@@ -6,36 +6,86 @@
|
|
|
6
6
|
# Available structure:
|
|
7
7
|
# navigation:
|
|
8
8
|
# brand: site-wide brand/home text; defaults to the homepage title
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
9
|
+
# layout:
|
|
10
|
+
# density: compact | normal | airy
|
|
11
|
+
# pageWidth: CSS length, e.g. 1180px
|
|
12
|
+
# gutter:
|
|
13
|
+
# desktop: CSS length or clamp(), e.g. clamp(1.25rem, 4vw, 3rem)
|
|
14
|
+
# mobile: CSS length, e.g. 1rem
|
|
15
|
+
# spacing:
|
|
16
|
+
# firstSectionTop:
|
|
17
|
+
# desktop: CSS length or clamp(), e.g. clamp(1.875rem, 3vw, 2.75rem)
|
|
18
|
+
# mobile: CSS length, e.g. 1.375rem
|
|
19
|
+
# sectionGap:
|
|
20
|
+
# desktop: CSS length or clamp(), e.g. clamp(1.4rem, 3vw, 2.75rem)
|
|
21
|
+
# mobile: CSS length, e.g. 1.5rem
|
|
22
|
+
# finalSectionBottom:
|
|
23
|
+
# desktop: CSS length or clamp(), e.g. clamp(1.4rem, 3vw, 2.75rem)
|
|
24
|
+
# mobile: CSS length, e.g. 1.5rem
|
|
25
|
+
# bodyToImages:
|
|
26
|
+
# desktop: CSS length, e.g. 1.25rem
|
|
27
|
+
# mobile: CSS length, e.g. 1rem
|
|
28
|
+
# imageGap:
|
|
29
|
+
# desktop: CSS length or clamp(), e.g. clamp(1.25rem, 2.8vw, 2rem)
|
|
30
|
+
# mobile: CSS length, e.g. 1.5rem
|
|
31
|
+
# gallery:
|
|
32
|
+
# width: CSS length, e.g. 900px
|
|
33
|
+
# maxAvailableWidthPercent:
|
|
34
|
+
# desktop: number from 1 through 100
|
|
35
|
+
# mobile: number from 1 through 100
|
|
36
|
+
# maxAvailableHeightPercent:
|
|
37
|
+
# desktop: number from 1 through 100
|
|
38
|
+
# mobile: number from 1 through 100
|
|
39
|
+
# typography:
|
|
40
|
+
# fontFamily: CSS font-family stack
|
|
41
|
+
# preset: quiet-gallery | compact-gallery | text-forward | statement
|
|
42
|
+
# rhythm: compact | normal | airy
|
|
43
|
+
# overrides:
|
|
44
|
+
# headings:
|
|
45
|
+
# h2:
|
|
19
46
|
# align:
|
|
20
47
|
# desktop: left | center | right
|
|
21
48
|
# mobile: left | center | right
|
|
22
49
|
# size: small | medium | large | xlarge
|
|
23
50
|
# lineHeight: number from 1 through 3
|
|
24
|
-
#
|
|
25
|
-
#
|
|
51
|
+
# spacingBefore: CSS length, e.g. 0
|
|
52
|
+
# spacingAfter: CSS length, e.g. 0.55em
|
|
53
|
+
# h3:
|
|
26
54
|
# align:
|
|
27
55
|
# desktop: left | center | right
|
|
28
56
|
# mobile: left | center | right
|
|
29
57
|
# size: small | medium | large | xlarge
|
|
30
58
|
# lineHeight: number from 1 through 3
|
|
31
|
-
#
|
|
32
|
-
#
|
|
59
|
+
# spacingBefore: CSS length, e.g. 1.5em
|
|
60
|
+
# spacingAfter: CSS length, e.g. 0.5em
|
|
61
|
+
# h4:
|
|
33
62
|
# align:
|
|
34
63
|
# desktop: left | center | right
|
|
35
64
|
# mobile: left | center | right
|
|
36
65
|
# size: small | medium | large | xlarge
|
|
37
66
|
# lineHeight: number from 1 through 3
|
|
38
|
-
#
|
|
67
|
+
# spacingBefore: CSS length, e.g. 1.1em
|
|
68
|
+
# spacingAfter: CSS length, e.g. 0.4em
|
|
69
|
+
# body:
|
|
70
|
+
# align:
|
|
71
|
+
# desktop: left | center | right
|
|
72
|
+
# mobile: left | center | right
|
|
73
|
+
# size: small | medium | large | xlarge
|
|
74
|
+
# lineHeight: number from 1 through 3
|
|
75
|
+
# paragraphSpacing: CSS length, e.g. 0.85em
|
|
76
|
+
# caption:
|
|
77
|
+
# align:
|
|
78
|
+
# desktop: left | center | right
|
|
79
|
+
# mobile: left | center | right
|
|
80
|
+
# size: small | medium | large | xlarge
|
|
81
|
+
# lineHeight: number from 1 through 3
|
|
82
|
+
# spacingBefore: CSS length, e.g. 0.5em
|
|
83
|
+
# presentation:
|
|
84
|
+
# backgroundColor: quoted hex color, e.g. "#000000"
|
|
85
|
+
# textColor: quoted hex color, e.g. "#f7f4ee"
|
|
86
|
+
# inlineStyles:
|
|
87
|
+
# style-name:
|
|
88
|
+
# color: quoted hex color
|
|
39
89
|
# frame:
|
|
40
90
|
# colors: presentation | theme
|
|
41
91
|
# colors:
|
|
@@ -43,15 +93,31 @@
|
|
|
43
93
|
# textColor: quoted hex color
|
|
44
94
|
# norna:end theme-help
|
|
45
95
|
navigation:
|
|
46
|
-
brand: Example
|
|
96
|
+
brand: Example Site
|
|
97
|
+
layout:
|
|
98
|
+
density: normal
|
|
99
|
+
pageWidth: 1180px
|
|
100
|
+
gutter:
|
|
101
|
+
desktop: clamp(1.25rem, 4vw, 3rem)
|
|
102
|
+
mobile: 1rem
|
|
103
|
+
gallery:
|
|
104
|
+
width: 900px
|
|
105
|
+
maxAvailableWidthPercent:
|
|
106
|
+
desktop: 100
|
|
107
|
+
mobile: 100
|
|
108
|
+
maxAvailableHeightPercent:
|
|
109
|
+
desktop: 74
|
|
110
|
+
mobile: 68
|
|
111
|
+
typography:
|
|
112
|
+
fontFamily: "Arial, 'Helvetica Neue', Helvetica, sans-serif"
|
|
113
|
+
preset: quiet-gallery
|
|
114
|
+
rhythm: normal
|
|
47
115
|
presentation:
|
|
48
116
|
backgroundColor: "#000000"
|
|
49
117
|
textColor: "#f7f4ee"
|
|
50
118
|
inlineStyles:
|
|
51
119
|
highlight:
|
|
52
120
|
color: "#ffd84d"
|
|
53
|
-
typography:
|
|
54
|
-
preset: quiet-gallery
|
|
55
121
|
frame:
|
|
56
122
|
colors: presentation
|
|
57
123
|
---
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Deploy to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: github-pages
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Setup Node
|
|
26
|
+
uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 24.18.0
|
|
29
|
+
cache: npm
|
|
30
|
+
|
|
31
|
+
- name: Install image tools
|
|
32
|
+
run: sudo apt-get update && sudo apt-get install -y imagemagick
|
|
33
|
+
|
|
34
|
+
- name: Restore generated images
|
|
35
|
+
uses: actions/cache@v4
|
|
36
|
+
with:
|
|
37
|
+
path: site/.norna/public/images/generated
|
|
38
|
+
key: norna-images-${{ hashFiles('site/.norna/generated-images.json') }}
|
|
39
|
+
restore-keys: |
|
|
40
|
+
norna-images-
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: npm ci
|
|
44
|
+
|
|
45
|
+
- name: Build
|
|
46
|
+
run: npm run build
|
|
47
|
+
|
|
48
|
+
- name: Configure Pages
|
|
49
|
+
uses: actions/configure-pages@v5
|
|
50
|
+
|
|
51
|
+
- name: Upload Pages artifact
|
|
52
|
+
uses: actions/upload-pages-artifact@v3
|
|
53
|
+
with:
|
|
54
|
+
path: dist
|
|
55
|
+
|
|
56
|
+
deploy:
|
|
57
|
+
needs: build
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
environment:
|
|
60
|
+
name: github-pages
|
|
61
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
62
|
+
steps:
|
|
63
|
+
- name: Deploy to GitHub Pages
|
|
64
|
+
id: deployment
|
|
65
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Project Starter
|
|
2
|
+
|
|
3
|
+
This is a compact Norna starter for small open source projects, CLI tools,
|
|
4
|
+
libraries, and similar project sites.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install
|
|
10
|
+
npm run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If the standard local port is blocked, start with:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm run dev -- --kill
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Files
|
|
20
|
+
|
|
21
|
+
- `site/config.mjs`: technical settings such as URL, language labels, GitHub
|
|
22
|
+
repository, and deploy workflow.
|
|
23
|
+
- `site/theme.md`: site-wide visual settings such as brand text, layout
|
|
24
|
+
density, typography rhythm, colors, frame colors, and inline text styles.
|
|
25
|
+
- `site/content.md`: homepage title, sections, placeholders, project summary,
|
|
26
|
+
links, install command, example usage, benefits, next steps, and license.
|
|
27
|
+
- `site/routes/guide/route-content.md`: short secondary page with realistic
|
|
28
|
+
project guide content.
|
|
29
|
+
- `site/public/robots.txt`: static public file copied into the built site.
|
|
30
|
+
|
|
31
|
+
The starter intentionally does not include generated output, `node_modules`, or
|
|
32
|
+
a local Norna installation. It does include `package-lock.json` because the
|
|
33
|
+
GitHub Pages workflow uses `npm ci`.
|
|
34
|
+
|
|
35
|
+
## Adapt The Starter
|
|
36
|
+
|
|
37
|
+
1. Replace the project name, tagline, links, install command, example usage,
|
|
38
|
+
benefits, use cases, and license in `site/content.md`.
|
|
39
|
+
2. Replace the guide examples in `site/routes/guide/route-content.md`, or
|
|
40
|
+
delete the route if the homepage is enough.
|
|
41
|
+
3. Edit `site/theme.md` for brand name, layout density, typography rhythm,
|
|
42
|
+
colors, frame colors, and inline text styles.
|
|
43
|
+
4. Edit `site/config.mjs` for public URL, GitHub repository, footer text, and
|
|
44
|
+
deploy workflow name.
|
|
45
|
+
5. Update `package.json` with the site's package name and keep
|
|
46
|
+
`package-lock.json` committed.
|
|
47
|
+
|
|
48
|
+
## Common Commands
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm run norna:check
|
|
52
|
+
npm run norna:typography:show
|
|
53
|
+
npm run build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To verify the same install path used by GitHub Pages:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npm ci
|
|
60
|
+
npm run build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Generic Norna documentation lives in the Norna repository:
|
|
64
|
+
|
|
65
|
+
- `docs/getting-started.md`
|
|
66
|
+
- `docs/site-structure.md`
|
|
67
|
+
- `docs/content.md`
|
|
68
|
+
- `docs/theme.md`
|
|
69
|
+
- `docs/typography.md`
|
|
70
|
+
- `docs/routes.md`
|
|
71
|
+
- `docs/configuration.md`
|
|
72
|
+
- `docs/commands.md`
|