@janga/norna 0.7.2 → 0.7.3
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 +10 -11
- package/docs/commands.md +8 -8
- package/docs/configuration.md +13 -145
- package/docs/content.md +17 -15
- package/docs/design/command-organization.md +55 -55
- package/docs/design/site-examples-structure.md +2 -2
- package/docs/engine-development.md +5 -5
- package/docs/getting-started.md +19 -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 +149 -7
- package/docs/typography.md +47 -28
- package/examples/dog-gallery/.astro/collections/site.schema.json +802 -0
- package/examples/dog-gallery/.astro/collections/theme.schema.json +714 -0
- package/examples/dog-gallery/.astro/content-assets.mjs +4 -0
- package/examples/dog-gallery/.astro/content-modules.mjs +1 -0
- package/examples/dog-gallery/.astro/content.d.ts +175 -0
- package/examples/dog-gallery/.astro/data-store.json +1 -0
- package/examples/dog-gallery/.astro/dev-local.json +8 -0
- package/examples/dog-gallery/.astro/dev.json +13 -0
- package/examples/dog-gallery/.astro/dev.log +49 -0
- package/examples/dog-gallery/.astro/settings.json +5 -0
- package/examples/dog-gallery/.astro/types.d.ts +2 -0
- package/examples/dog-gallery/dist/_astro/GalleryGrid.astro_astro_type_script_index_0_lang.B0kxDyGz.js +1 -0
- package/examples/dog-gallery/dist/_astro/SitePage.BFHZm5UG.css +1 -0
- package/examples/dog-gallery/dist/dog-care/index.html +15 -0
- package/examples/dog-gallery/dist/favicon.svg +7 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-1536.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/black-puppy-meadow-7255e3d9-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/black-dogs/photo-of-a-black-dog-5cf614d2-960.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-3939.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/brown-dog-50ef114e-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-2400.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/brown-dogs/dog-accompanies-master-7ef804d5-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-1600.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/golden-retriever-f797fd88-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-1920.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-2576.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/golden-dogs/toller-puppy-a2a8fbc0-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-1277.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-cute-dog-077a0689-768.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1080.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1440.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-1536.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-480.webp +0 -0
- package/examples/dog-gallery/dist/images/generated/white-dogs/white-puppy-garden-d3ab2ca0-768.webp +0 -0
- package/examples/dog-gallery/dist/index.html +43 -0
- package/examples/dog-gallery/dist/robots.txt +2 -0
- 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 +27 -5
- package/examples/dog-gallery/site/routes/dog-care/route-content.md +17 -3
- package/examples/dog-gallery/site/theme.md +85 -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 +3 -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 +91 -45
- package/scripts/lib/site-content.mjs +20 -2
- package/scripts/lib/theme-config.mjs +34 -0
- package/scripts/lib/typography.mjs +100 -20
- package/scripts/show-typography.mjs +58 -154
- package/scripts/sync-content-sections.mjs +6 -6
- package/scripts/test-content-check.mjs +3 -4
- package/scripts/test-engine-commands.mjs +2 -2
- package/scripts/test-package-check.mjs +17 -16
- package/scripts/test-temporary-visibility.mjs +2 -3
- package/src/components/SitePage.astro +2 -3
- package/src/components/SiteSection.astro +39 -5
- package/src/content.config.ts +60 -2
- package/src/layouts/BaseLayout.astro +17 -0
- package/src/styles/global.css +54 -50
- package/starters/basic/README.md +10 -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 +110 -17
- 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 +88 -0
- package/starters/project/site/public/robots.txt +2 -0
- package/starters/project/site/routes/guide/route-content.md +58 -0
- package/starters/project/site/theme.md +15 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "project-site",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "npm run norna:dev --",
|
|
7
|
+
"norna:dev": "norna dev:local",
|
|
8
|
+
"norna:dev:lan": "norna dev:lan",
|
|
9
|
+
"norna:dev:restart": "norna dev:restart",
|
|
10
|
+
"norna:dev:status": "norna dev:status",
|
|
11
|
+
"norna:dev:logs": "norna dev:logs",
|
|
12
|
+
"norna:dev:stop": "norna dev:stop",
|
|
13
|
+
"norna:check": "npm run norna:config:check && npm run norna:content:check",
|
|
14
|
+
"norna:config:check": "norna config:check",
|
|
15
|
+
"norna:content:check": "norna content:check",
|
|
16
|
+
"norna:sync": "norna content:sync",
|
|
17
|
+
"norna:typography:presets": "norna typography presets",
|
|
18
|
+
"norna:typography:show": "norna typography show",
|
|
19
|
+
"norna:public": "norna site:public",
|
|
20
|
+
"norna:images": "norna images",
|
|
21
|
+
"norna:build": "norna build",
|
|
22
|
+
"norna:build:local": "norna build:local",
|
|
23
|
+
"norna:deploy": "norna deploy",
|
|
24
|
+
"norna:deploy:commit": "norna deploy:commit",
|
|
25
|
+
"norna:deploy:watch": "norna deploy:watch",
|
|
26
|
+
"norna:doctor": "norna doctor",
|
|
27
|
+
"norna:preview": "norna preview",
|
|
28
|
+
"norna:engine:update": "norna engine:update",
|
|
29
|
+
"norna:engine:version": "norna engine:version",
|
|
30
|
+
"build": "npm run norna:build"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@janga/norna": "0.7.2"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
site: {
|
|
3
|
+
url: 'https://example.com/',
|
|
4
|
+
basePath: '/',
|
|
5
|
+
},
|
|
6
|
+
navigation: {
|
|
7
|
+
smoothScroll: {
|
|
8
|
+
enabled: true,
|
|
9
|
+
minimumDurationMs: 500,
|
|
10
|
+
maximumDurationMs: 1_100,
|
|
11
|
+
durationPerPixelMs: 0.18,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
locale: {
|
|
15
|
+
lang: 'en',
|
|
16
|
+
labels: {
|
|
17
|
+
skipToContent: 'Skip to content',
|
|
18
|
+
siteNavigation: 'Pages',
|
|
19
|
+
pageNavigation: 'On this page',
|
|
20
|
+
sectionNavigation: 'Sections',
|
|
21
|
+
menu: 'Menu',
|
|
22
|
+
gallery: 'Images',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
footer: {
|
|
26
|
+
copyrightMessage: '(c) Project contributors.',
|
|
27
|
+
buildInfo: {
|
|
28
|
+
enabled: true,
|
|
29
|
+
text: 'Built',
|
|
30
|
+
dateTimeFormat: {
|
|
31
|
+
locale: 'en-GB',
|
|
32
|
+
timeZone: 'UTC',
|
|
33
|
+
dateStyle: 'short',
|
|
34
|
+
timeStyle: 'short',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
github: {
|
|
39
|
+
repo: 'owner/project-name',
|
|
40
|
+
branch: 'main',
|
|
41
|
+
pagesWorkflow: 'Deploy to GitHub Pages',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Project Name
|
|
3
|
+
description: A concise project site for an open source tool, library, or CLI.
|
|
4
|
+
navigation:
|
|
5
|
+
label: Home
|
|
6
|
+
order: 0
|
|
7
|
+
sections:
|
|
8
|
+
- id: intro
|
|
9
|
+
presentation:
|
|
10
|
+
typography:
|
|
11
|
+
preset: statement
|
|
12
|
+
- id: links
|
|
13
|
+
- id: install
|
|
14
|
+
- id: example
|
|
15
|
+
- id: features
|
|
16
|
+
- id: when-to-use
|
|
17
|
+
- id: next
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Project Name keeps project workflows predictable {#intro}
|
|
21
|
+
|
|
22
|
+
Project Name is a small open source tool for teams that want repeatable
|
|
23
|
+
results without adding a large platform. It provides one focused command-line
|
|
24
|
+
workflow and a compact JavaScript API for automation.
|
|
25
|
+
|
|
26
|
+
## Links {#links}
|
|
27
|
+
|
|
28
|
+
- [GitHub repository](https://github.com/owner/project-name)
|
|
29
|
+
- [Documentation](https://example.com/docs/)
|
|
30
|
+
- [Package](https://www.npmjs.com/package/project-name)
|
|
31
|
+
- [Issue tracker](https://github.com/owner/project-name/issues)
|
|
32
|
+
|
|
33
|
+
## Install {#install}
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install project-name
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Project Name supports current Node.js releases and works in local development,
|
|
40
|
+
CI jobs, and small publishing workflows.
|
|
41
|
+
|
|
42
|
+
## Example {#example}
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
project-name check ./src --format summary
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { checkProject } from 'project-name';
|
|
50
|
+
|
|
51
|
+
const report = await checkProject({
|
|
52
|
+
input: './src',
|
|
53
|
+
format: 'summary',
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
console.log(report.status);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use the CLI for everyday checks and the API when the same behavior belongs
|
|
60
|
+
inside a larger build script.
|
|
61
|
+
|
|
62
|
+
## Features {#features}
|
|
63
|
+
|
|
64
|
+
### Simple inputs
|
|
65
|
+
|
|
66
|
+
The project works with ordinary files and predictable commands.
|
|
67
|
+
|
|
68
|
+
### Scriptable results
|
|
69
|
+
|
|
70
|
+
The CLI prints human-readable summaries while the API returns structured data
|
|
71
|
+
for automation.
|
|
72
|
+
|
|
73
|
+
### Small surface area
|
|
74
|
+
|
|
75
|
+
There are only a few concepts to learn, so the project stays easy to adopt and
|
|
76
|
+
easy to replace.
|
|
77
|
+
|
|
78
|
+
## When to use it {#when-to-use}
|
|
79
|
+
|
|
80
|
+
- Validate repository conventions before a pull request is reviewed.
|
|
81
|
+
- Reuse the same checks locally and in CI.
|
|
82
|
+
- Add a focused command to an existing project without introducing a service.
|
|
83
|
+
- Expose a small API for downstream tooling.
|
|
84
|
+
|
|
85
|
+
## Next steps {#next}
|
|
86
|
+
|
|
87
|
+
Read the [guide](/guide/) for configuration options and a longer example, or
|
|
88
|
+
open the repository to inspect the implementation.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Guide
|
|
3
|
+
description: Learn the basic Project Name workflow.
|
|
4
|
+
navigation:
|
|
5
|
+
label: Guide
|
|
6
|
+
order: 10
|
|
7
|
+
sections:
|
|
8
|
+
- id: quickstart
|
|
9
|
+
- id: configuration
|
|
10
|
+
- id: api
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quickstart {#quickstart}
|
|
14
|
+
|
|
15
|
+
Install the package and run the default check against a source directory:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install project-name
|
|
19
|
+
npx project-name check ./src
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The command exits with a non-zero status when it finds an issue, so it can run
|
|
23
|
+
unchanged in local scripts and CI jobs.
|
|
24
|
+
|
|
25
|
+
## Configuration {#configuration}
|
|
26
|
+
|
|
27
|
+
Project Name looks for a project config file at the repository root:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
export default {
|
|
31
|
+
include: ['src', 'scripts'],
|
|
32
|
+
reporter: 'summary',
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Keep configuration small and explicit. Defaults should be good enough for a new
|
|
37
|
+
project, while advanced projects can opt into stricter behavior one setting at a
|
|
38
|
+
time.
|
|
39
|
+
|
|
40
|
+
## API {#api}
|
|
41
|
+
|
|
42
|
+
Use the API when checks need to be part of another tool:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import { checkProject } from 'project-name';
|
|
46
|
+
|
|
47
|
+
const report = await checkProject({
|
|
48
|
+
input: './src',
|
|
49
|
+
reporter: 'json',
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (!report.ok) {
|
|
53
|
+
process.exitCode = 1;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The API returns structured results so callers can decide whether to print a
|
|
58
|
+
summary, write a report file, or fail a build.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Site-wide visual defaults. Remove a value to use the engine default.
|
|
3
|
+
navigation:
|
|
4
|
+
brand: Project Name
|
|
5
|
+
presentation:
|
|
6
|
+
backgroundColor: "#101314"
|
|
7
|
+
textColor: "#f6f1e8"
|
|
8
|
+
inlineStyles:
|
|
9
|
+
accent:
|
|
10
|
+
color: "#8fd3ff"
|
|
11
|
+
muted:
|
|
12
|
+
color: "#b8b1a6"
|
|
13
|
+
frame:
|
|
14
|
+
colors: presentation
|
|
15
|
+
---
|