@nimtech/nimpress 2.3.9 → 2.5.0
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/.claude/rules/doc-pages.md +2 -2
- package/.claude/rules/docs-authoring.md +40 -4
- package/.claude/rules/frontmatter.md +30 -2
- package/.claude/rules/page-types.md +52 -0
- package/.claude/rules/style.md +4 -0
- package/.claude/skills/nimpress/SKILL.md +65 -7
- package/dist/cli.es.js +1415 -746
- package/dist/katex-BHBbz4bq.js +11283 -0
- package/dist/nimpress.es.js +7121 -5674
- package/dist/plugin-DOmbMyy0.js +6743 -0
- package/dist/plugin.es.js +11 -3
- package/dist/src/cli/cache.d.ts +2 -0
- package/dist/src/cli/cache.d.ts.map +1 -0
- package/dist/src/cli/completion.d.ts +12 -0
- package/dist/src/cli/completion.d.ts.map +1 -1
- package/dist/src/cli/init.d.ts.map +1 -1
- package/dist/src/cli/lint.d.ts.map +1 -1
- package/dist/src/cli/mcp.d.ts +2 -0
- package/dist/src/cli/mcp.d.ts.map +1 -0
- package/dist/src/cli/plugin.d.ts +3 -0
- package/dist/src/cli/plugin.d.ts.map +1 -0
- package/dist/src/cli/seo.d.ts +25 -0
- package/dist/src/cli/seo.d.ts.map +1 -0
- package/dist/src/cli/view.d.ts +53 -0
- package/dist/src/cli/view.d.ts.map +1 -0
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/config/defaults.d.ts.map +1 -1
- package/dist/src/config/load.d.ts +8 -1
- package/dist/src/config/load.d.ts.map +1 -1
- package/dist/src/config/schema.d.ts +486 -3
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/feedback/feedback.d.ts +5 -0
- package/dist/src/feedback/feedback.d.ts.map +1 -0
- package/dist/src/framework/configStore.d.ts +3 -1
- package/dist/src/framework/configStore.d.ts.map +1 -1
- package/dist/src/framework/createNimpressApp.d.ts +2 -1
- package/dist/src/framework/createNimpressApp.d.ts.map +1 -1
- package/dist/src/framework/gated.d.ts.map +1 -1
- package/dist/src/framework/hashSpy.d.ts.map +1 -1
- package/dist/src/framework/pageMeta.d.ts.map +1 -1
- package/dist/src/framework/stores/tabs.d.ts +3 -0
- package/dist/src/framework/stores/tabs.d.ts.map +1 -0
- package/dist/src/index.d.ts +15 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/markdown/GlossaryPage.svelte.d.ts +1 -0
- package/dist/src/markdown/Lightbox.svelte.d.ts +1 -0
- package/dist/src/markdown/MathBlock.svelte.d.ts +1 -0
- package/dist/src/markdown/NotFoundPage.svelte.d.ts +1 -0
- package/dist/src/markdown/PricingPage.svelte.d.ts +1 -0
- package/dist/src/markdown/SectionPage.svelte.d.ts +1 -0
- package/dist/src/markdown/Tabs.svelte.d.ts +1 -0
- package/dist/src/markdown/TagsPage.svelte.d.ts +1 -0
- package/dist/src/markdown/TeamPage.svelte.d.ts +1 -0
- package/dist/src/types.d.ts +149 -7
- package/dist/src/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -2
- package/src/styles/preflight.css +247 -46
- package/src/styles/theme.css +7 -6
- package/src/styles/tokens.css +25 -0
- package/dist/plugin-C3C36uvj.js +0 -3851
- /package/dist/src/{markdown/CalloutCheck.svelte.d.ts → layout/Announce.svelte.d.ts} +0 -0
- /package/dist/src/{markdown/CalloutInfo.svelte.d.ts → layout/Footer.svelte.d.ts} +0 -0
- /package/dist/src/markdown/{CalloutNote.svelte.d.ts → Callout.svelte.d.ts} +0 -0
- /package/dist/src/markdown/{CalloutTip.svelte.d.ts → Feedback.svelte.d.ts} +0 -0
- /package/dist/src/markdown/{CalloutWarning.svelte.d.ts → FullPage.svelte.d.ts} +0 -0
|
@@ -32,7 +32,7 @@ title: How sessions work
|
|
|
32
32
|
|
|
33
33
|
5. `slug` shortens the sidebar label without renaming the file.
|
|
34
34
|
|
|
35
|
-
6. `
|
|
35
|
+
6. `hide: [toc]` hides the right rail. Use only on short pages where the TOC would feel empty. The same list takes `navigation`, `path`, `footer`, and `tags`.
|
|
36
36
|
|
|
37
37
|
7. `footer` renders a centered, muted line at the bottom of the page.
|
|
38
38
|
|
|
@@ -56,7 +56,7 @@ title: How sessions work
|
|
|
56
56
|
|
|
57
57
|
7. Callouts are `:::tip`, `:::note`, `:::warning`, `:::info`, `:::check`. Three on a page is a lot.
|
|
58
58
|
|
|
59
|
-
8. Definition lists for reference grids of terms with one line descriptions. See [Definition lists](https://nimling.github.io/nimpress/definition-lists).
|
|
59
|
+
8. Definition lists for reference grids of terms with one line descriptions. See [Definition lists](https://nimling.github.io/nimpress/authoring/definition-lists).
|
|
60
60
|
|
|
61
61
|
9. Mermaid blocks render `flowchart`, `stateDiagram-v2`, `sequenceDiagram`, `erDiagram` when a flow or state reads more cleanly visually.
|
|
62
62
|
|
|
@@ -30,7 +30,7 @@ Rules for writing markdown pages, both inside this repo's `docs/` and inside con
|
|
|
30
30
|
|
|
31
31
|
## Links
|
|
32
32
|
|
|
33
|
-
1. Prefer relative links within the same section, absolute links across sections. See [Relative links](https://nimling.github.io/nimpress/relative-links).
|
|
33
|
+
1. Prefer relative links within the same section, absolute links across sections. See [Relative links](https://nimling.github.io/nimpress/authoring/relative-links).
|
|
34
34
|
|
|
35
35
|
2. Use the page title as the link text. Avoid `click here`.
|
|
36
36
|
|
|
@@ -64,6 +64,24 @@ Rules for writing markdown pages, both inside this repo's `docs/` and inside con
|
|
|
64
64
|
|
|
65
65
|
5. `:::check` for verification steps.
|
|
66
66
|
|
|
67
|
+
6. `:::abstract` for a summary of the section that follows.
|
|
68
|
+
|
|
69
|
+
7. `:::success` for the outcome the reader sees when a step worked.
|
|
70
|
+
|
|
71
|
+
8. `:::question` for a question the reader is likely to ask, answered in the body.
|
|
72
|
+
|
|
73
|
+
9. `:::failure` for the outcome the reader sees when a step did not work.
|
|
74
|
+
|
|
75
|
+
10. `:::danger` for actions that lose data or cannot be undone.
|
|
76
|
+
|
|
77
|
+
11. `:::bug` for a known defect and its workaround.
|
|
78
|
+
|
|
79
|
+
12. `:::example` for a worked example set apart from the prose.
|
|
80
|
+
|
|
81
|
+
13. `:::quote` for a quotation with its source.
|
|
82
|
+
|
|
83
|
+
Text after the type name is the title, `""` removes the title row, and a JSON payload on the opening line takes `collapsible`, `open`, and `inline`. See [Markdown](https://nimling.github.io/nimpress/authoring/markdown).
|
|
84
|
+
|
|
67
85
|
Use sparingly. Three callouts on a page is already a lot.
|
|
68
86
|
|
|
69
87
|
## Definition lists
|
|
@@ -75,7 +93,7 @@ term_name
|
|
|
75
93
|
: One line description.
|
|
76
94
|
```
|
|
77
95
|
|
|
78
|
-
See [Definition lists](https://nimling.github.io/nimpress/definition-lists).
|
|
96
|
+
See [Definition lists](https://nimling.github.io/nimpress/authoring/definition-lists).
|
|
79
97
|
|
|
80
98
|
## When to write what
|
|
81
99
|
|
|
@@ -85,6 +103,24 @@ See [Definition lists](https://nimling.github.io/nimpress/definition-lists).
|
|
|
85
103
|
|
|
86
104
|
3. Reference: dense table of fields, options, or APIs. Tables and definition lists carry most of the content.
|
|
87
105
|
|
|
88
|
-
4. Changelog entry: one markdown file per release, `type: changelog`, `data.version` set. See [Changelog renderer](https://nimling.github.io/nimpress/changelog
|
|
106
|
+
4. Changelog entry: one markdown file per release, `type: changelog`, `data.version` set. See [Changelog renderer](https://nimling.github.io/nimpress/page-types/changelog).
|
|
107
|
+
|
|
108
|
+
5. Landing page: `type: hero` with a tagline and feature grid. See [Hero](https://nimling.github.io/nimpress/page-types/hero).
|
|
109
|
+
|
|
110
|
+
## Page skeleton
|
|
111
|
+
|
|
112
|
+
Every feature page in `docs/` follows one shape.
|
|
113
|
+
|
|
114
|
+
1. A definition paragraph opens the page: what the thing is, why it matters in documentation, and what nimpress provides. A definition sentence borrowed from a reference keeps its adjectives and dashes; the voice rules above do not rewrite it.
|
|
115
|
+
|
|
116
|
+
2. `## Configuration` follows when a switch exists, with one H3 per option. A configuration paragraph ends with "Add the following lines to your configuration:" and a fenced json block of the config field.
|
|
117
|
+
|
|
118
|
+
3. `## Usage` follows with one H3 per verb, `### Add a button`, `### Hide the sidebars`, `### Use card grids`. A usage paragraph that depends on a switch opens with "When X is enabled".
|
|
119
|
+
|
|
120
|
+
4. `## Customization` follows when an override exists, with one H3 per override. Pages that render chrome end with `## Restyling` pointing at the styling reference.
|
|
121
|
+
|
|
122
|
+
5. Names stay nimpress names when the sentences are borrowed: callouts, actions, cards, features, frontmatter. Nothing is called an admonition.
|
|
123
|
+
|
|
124
|
+
## The tree
|
|
89
125
|
|
|
90
|
-
|
|
126
|
+
`docs/` has one folder per top level section: `get-started`, `usage`, `setup`, `authoring`, `page-types`, `examples`, `styling`, `community`, plus `changelog`, `tags`, `glossary`, and `404` at the root. A page that lives at the root keeps its url and joins its section with a `sidebar` block whose `path` names the section folder.
|
|
@@ -24,7 +24,13 @@ Every markdown page declares YAML frontmatter at the top. Parsed with `gray-matt
|
|
|
24
24
|
|
|
25
25
|
5. `visibility` controls where the page appears, one of `visible`, `hidden`, `dev-only`. `visible` is the default. `hidden` removes the page from sidebar, search, and the build, use it for drafts. `dev-only` keeps the page in `nimpress dev` but excludes it from the built bundle, use it for pages that must never ship.
|
|
26
26
|
|
|
27
|
-
6. `
|
|
27
|
+
6. `hide` is a list of page elements to drop. Use the hide front matter property to hide one or more elements of a page: `navigation` drops the sidebar column, `toc` the right rail, `path` the breadcrumbs, `footer` the page footer line, `tags` the tag row. `hide: [toc]` on hero pages and short pages where the TOC would feel empty. A `hide` list in `defaultFrontmatter` merges with the page's own list.
|
|
28
|
+
|
|
29
|
+
6.1. `status: <identifier>` marks the page in the sidebar. A status can be assigned to each page and displayed in the navigation sidebar. `new` and `deprecated` carry labels without configuration; the `status` config field maps further identifiers to labels. The row renders a `np-sidebar-status` mark with the label as its title plus `np-sidebar-status-<identifier>` for coloring.
|
|
30
|
+
|
|
31
|
+
6.2. `feedback: true` shows the was this page helpful widget under the page when the `feedback` config block exists, the way `subscribe: true` shows the subscribe control on a changelog. Sites that want it everywhere set it in `defaultFrontmatter`, and a page turns it off again with `feedback: false`.
|
|
32
|
+
|
|
33
|
+
6.3. `styles` lists extra stylesheets for the page, relative to the markdown file. `<page>.css` and `<page>.<component>.css` beside the page load by name without it. See the styling rule.
|
|
28
34
|
|
|
29
35
|
7. `footer: string` renders a centered, muted line at the bottom. Use for "Last reviewed", attribution, or a contact pointer.
|
|
30
36
|
|
|
@@ -40,6 +46,14 @@ Every markdown page declares YAML frontmatter at the top. Parsed with `gray-matt
|
|
|
40
46
|
| A reference page rendered from an OpenAPI 3.1 spec | `openapi` |
|
|
41
47
|
| A page combining several release notes into one collapsible list | `changelog` |
|
|
42
48
|
| A landing page with an oversized hero band on top | `hero` |
|
|
49
|
+
| A landing page under the header alone, no sidebar, no rail, full width | `fullpage` |
|
|
50
|
+
| The not found page the build serves for an unknown address | `404` |
|
|
51
|
+
| A folder index that lists its children as a card grid | `section` |
|
|
52
|
+
| The listing of every tag with its pages | `tags` |
|
|
53
|
+
| The definition list of the site terms that feeds tooltips everywhere | `glossary` |
|
|
54
|
+
| A grid of people from frontmatter data | `team` |
|
|
55
|
+
| A row of plans with prices from frontmatter data | `pricing` |
|
|
56
|
+
| A shape of your own, or a built in renderer replaced | a name from `pageTypes` in the config |
|
|
43
57
|
| A vertical roadmap timeline of milestones, epics, features, and bugs | `roadmap` |
|
|
44
58
|
| An interactive entity relationship diagram of a database | `dbml` |
|
|
45
59
|
| A live workshop page for one component in a library | `component` |
|
|
@@ -50,7 +64,19 @@ Every markdown page declares YAML frontmatter at the top. Parsed with `gray-matt
|
|
|
50
64
|
|
|
51
65
|
2. `type: changelog` requires `data.version: '1.2.3'`, `data.release_date` as an RFC 3339 date, `data.title` for the per release headline, and `data.description` for the per release summary. Top level `title` is the shared collection title and the grouping key, every entry file in the same folder uses the exact same string. The route comes from the folder, so entries carry no `path` field. Optional `data.issue: <relative path>` plus `data.status` link the entry to a roadmap issue. See [changelog-entries.md](./changelog-entries.md).
|
|
52
66
|
|
|
53
|
-
3. `type: hero` reads `data.eyebrow`, `data.logo`, `data.banner`, `data.tagline`, `data.lead`, `data.image`, `data.align`. Action buttons and feature grids compose as `:::actions` and `:::features` in the markdown body, `data` carries only the band fields. See [Hero](https://nimling.github.io/nimpress/hero) and [Markdown](https://nimling.github.io/nimpress/markdown).
|
|
67
|
+
3. `type: hero` reads `data.eyebrow`, `data.logo`, `data.banner`, `data.tagline`, `data.lead`, `data.image`, `data.align`. Action buttons and feature grids compose as `:::actions` and `:::features` in the markdown body, `data` carries only the band fields. See [Hero](https://nimling.github.io/nimpress/page-types/hero) and [Markdown](https://nimling.github.io/nimpress/authoring/markdown).
|
|
68
|
+
|
|
69
|
+
3.1. `type: fullpage` reads `data.eyebrow`, `data.logo`, `data.background`, `data.tagline`, `data.lead`, `data.align`, and `data.width`. The type hides `navigation`, `path`, `toc`, and `footer` by itself. See [Full pages](https://nimling.github.io/nimpress/page-types/fullpage).
|
|
70
|
+
|
|
71
|
+
3.2. `type: 404` needs `title` alone. The build writes the page as `404.html` at the output root, the app routes an unknown path to it, and it stays out of the sidebar, search, and the sitemap. One per site. See [Not found page](https://nimling.github.io/nimpress/page-types/404).
|
|
72
|
+
|
|
73
|
+
3.3. `type: section` belongs on a folder `index.md` and reads `data.columns` and `data.depth`. The body renders first and every child page follows as a card in sidebar order. See [Section pages](https://nimling.github.io/nimpress/page-types/section).
|
|
74
|
+
|
|
75
|
+
3.4. `type: tags` needs `title` alone and lists every tag with its pages under the body. One per site. Every page shows its `tags` at the bottom, hidden with `hide: [tags]`, and the `tags` config block maps tags to identifiers and identifiers to icons. See [Tags page](https://nimling.github.io/nimpress/page-types/tags).
|
|
76
|
+
|
|
77
|
+
3.5. `type: glossary` needs `title` and a definition list body. Every term gets an anchor, the rail lists the terms, and the first occurrence of a term in each paragraph of every other page renders as an abbreviation with a tooltip. One per site. See [Glossary page](https://nimling.github.io/nimpress/page-types/glossary).
|
|
78
|
+
|
|
79
|
+
3.6. `type: team` requires `data.members`, each with `name` and optional `role`, `image`, `bio`, and `links`; `data.columns` and `data.align` shape the grid. `type: pricing` requires `data.tiers`, each with `name` and optional `price`, `period`, `description`, `benefits`, `action`, and `highlight`; `data.columns` and `data.footnote` shape the row. See [Team pages](https://nimling.github.io/nimpress/page-types/team) and [Pricing pages](https://nimling.github.io/nimpress/page-types/pricing).
|
|
54
80
|
|
|
55
81
|
4. `type: roadmap` reads `title`, optional `description`, optional `background`, and optional `data.changelog`, `data.issues` to scope which sibling folders feed the timeline. The markdown body renders as the page header above the timeline. Sibling files of `type: milestone | epic | feature | bug` become the timeline items.
|
|
56
82
|
|
|
@@ -82,6 +108,8 @@ meta:
|
|
|
82
108
|
headline: My page
|
|
83
109
|
```
|
|
84
110
|
|
|
111
|
+
`meta.override: true` keeps the authored keywords and description when `seo.auto` generates them; without it the generated values win. `meta.ai: false` adds `noai, noimageai` to the page's robots meta, and `true` lifts a site wide `seo.ai.index: false` for the page.
|
|
112
|
+
|
|
85
113
|
Structured payloads beyond `meta` live inside `data` as structured objects, never as loose top level fields. Defaults flow from `frontmatter.description` and the site level `site` config in `createNimpressApp`. Full reference in [SEO](https://nimling.github.io/nimpress/seo).
|
|
86
114
|
|
|
87
115
|
## Gating
|
|
@@ -42,6 +42,40 @@ Use sparingly for:
|
|
|
42
42
|
|
|
43
43
|
Do not use `hero` for ordinary documentation. The oversized typography is a beacon, not a default.
|
|
44
44
|
|
|
45
|
+
## `fullpage`
|
|
46
|
+
|
|
47
|
+
Use for:
|
|
48
|
+
|
|
49
|
+
1. The site home when the sidebar would distract from the pitch.
|
|
50
|
+
|
|
51
|
+
2. A product landing that opens a section and routes the reader onward.
|
|
52
|
+
|
|
53
|
+
The type hides the sidebar, the breadcrumbs, the rail, and the previous and next links by itself, and the band plus the body span the viewport. Do not use `fullpage` for a page the reader will read top to bottom; a `hero` keeps the shell for that.
|
|
54
|
+
|
|
55
|
+
## `404`
|
|
56
|
+
|
|
57
|
+
Use for exactly one page per site: the not found page the build serves for every address with no page behind it. The body carries the prose and an action row back into the site. Never place it in the sidebar unless the site wants a visible link to it.
|
|
58
|
+
|
|
59
|
+
## `section`
|
|
60
|
+
|
|
61
|
+
Use for a folder `index.md` that opens a section: the prose renders first and every child page follows as a card in sidebar order, so the overview needs no authored list. `data.columns` pins the column count and `data.depth: 2` lists grandchildren under a heading per child folder. The type belongs on a folder index only. See [Section pages](https://nimling.github.io/nimpress/page-types/section).
|
|
62
|
+
|
|
63
|
+
## `tags`
|
|
64
|
+
|
|
65
|
+
Use for exactly one page per site: the listing of every tag with its pages. Tags themselves go on the pages through the `tags` frontmatter field, and the `tags` config block gives them icons. See [Tags page](https://nimling.github.io/nimpress/page-types/tags).
|
|
66
|
+
|
|
67
|
+
## `glossary`
|
|
68
|
+
|
|
69
|
+
Use for exactly one page per site: the definition list of the terms every page should explain. Each term becomes an abbreviation with a tooltip wherever it occurs in the prose of other pages. Page local abbreviations use `*[TERM]: description` lines instead. See [Glossary page](https://nimling.github.io/nimpress/page-types/glossary).
|
|
70
|
+
|
|
71
|
+
## `team`
|
|
72
|
+
|
|
73
|
+
Use for a page whose content is people: a grid of members from `data.members` with a name, a role, a bio, and links. Prose stays in the body above the grid. See [Team pages](https://nimling.github.io/nimpress/page-types/team).
|
|
74
|
+
|
|
75
|
+
## `pricing`
|
|
76
|
+
|
|
77
|
+
Use for a page whose content is plans: a row of tiers from `data.tiers` with a price, a benefit list, and one action, `highlight` on the recommended one. Prose stays in the body and the small print in `data.footnote`. See [Pricing pages](https://nimling.github.io/nimpress/page-types/pricing).
|
|
78
|
+
|
|
45
79
|
## `roadmap`
|
|
46
80
|
|
|
47
81
|
Use when:
|
|
@@ -86,6 +120,10 @@ A live component workshop page. Use when:
|
|
|
86
120
|
|
|
87
121
|
Frontmatter needs `data.system` and `data.component`. One `type: component` page per folder; the sibling `.story.ts` files become the stories. See [component-modules.md](./component-modules.md).
|
|
88
122
|
|
|
123
|
+
## Custom types
|
|
124
|
+
|
|
125
|
+
A type the site registers under `pageTypes` in the config, a Svelte component that receives the page. Use it when a shape recurs on a site and none of the built in types fits, and put a `<Component>.schema.json` beside it so lint validates the `data` fields. A built in name under `pageTypes` replaces that renderer for the whole site. See [Custom page types](https://nimling.github.io/nimpress/page-types/custom).
|
|
126
|
+
|
|
89
127
|
## Decision tree
|
|
90
128
|
|
|
91
129
|
```
|
|
@@ -102,6 +140,20 @@ Is the page rendered from an OpenAPI spec?
|
|
|
102
140
|
│ └─ Yes → type: dbml
|
|
103
141
|
├─ Is it a live component workshop page?
|
|
104
142
|
│ └─ Yes → type: component
|
|
143
|
+
├─ Is it a grid of people?
|
|
144
|
+
│ └─ Yes → type: team
|
|
145
|
+
├─ Is it a row of plans with prices?
|
|
146
|
+
│ └─ Yes → type: pricing
|
|
147
|
+
├─ Is it the definition list of the site's terms?
|
|
148
|
+
│ └─ Yes → type: glossary
|
|
149
|
+
├─ Is it the listing of every tag with its pages?
|
|
150
|
+
│ └─ Yes → type: tags
|
|
151
|
+
├─ Is it a folder index that lists its children as cards?
|
|
152
|
+
│ └─ Yes → type: section
|
|
153
|
+
├─ Is it the not found page of the site?
|
|
154
|
+
│ └─ Yes → type: 404
|
|
155
|
+
├─ Is it a landing page with none of the shell chrome?
|
|
156
|
+
│ └─ Yes → type: fullpage
|
|
105
157
|
├─ Is it a beacon style landing page?
|
|
106
158
|
│ └─ Yes → type: hero
|
|
107
159
|
└─ Otherwise → type: doc (omit the field)
|
package/.claude/rules/style.md
CHANGED
|
@@ -42,6 +42,10 @@ Consumers override Nimpress styles by:
|
|
|
42
42
|
|
|
43
43
|
2. A per page stylesheet named the same as a markdown file. `guide/index.css` next to `guide/index.md` loads while the route is `/guide` or any path under it. A leaf page's stylesheet loads only on its own page. The author writes normal selectors and they apply only while inside that subtree.
|
|
44
44
|
|
|
45
|
+
2.1. A file under `styles/` in the content folder named after a component class root, `styles/tag.css`, applies to that component on every page, wrapped in `@scope (.np-tag)`. A file named `<page>.<component>.css` beside a page applies to that component on that page only. Lint checks the component name against the class roots.
|
|
46
|
+
|
|
47
|
+
2.2. A `styles` list in the frontmatter names further stylesheets for the page, relative to the markdown file.
|
|
48
|
+
|
|
45
49
|
3. A css file that is not a page style, such as a story asset loaded with `?raw`, is named with a leading underscore, `template/_cv.css`. Lint treats underscore css as inert; any other css file must sit next to the markdown page it is named after.
|
|
46
50
|
|
|
47
51
|
Consumers never need to fork the framework to change visuals.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nimpress
|
|
3
|
-
description: Drive the nimpress documentation site cli from the terminal. Use when scaffolding a docs site, running or building it, linting content and frontmatter, managing the component workshop with schemas stories and harnesses, exporting pages for the docs sync pipeline, wiring gated pages to the auth provider, or installing this skill and shell completion.
|
|
3
|
+
description: Drive the nimpress documentation site cli from the terminal. Use when scaffolding a docs site, running or building it, linting content and frontmatter, managing the component workshop with schemas stories and harnesses, exporting pages for the docs sync pipeline, previewing a repo's export folder inside the central docs site, wiring gated pages to the auth provider, or installing this skill, the Claude Code plugin with its mcp server, and shell completion.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# nimpress
|
|
7
7
|
|
|
8
|
-
`nimpress` is the cli of `@nimtech/nimpress`, a Svelte 5 documentation site framework. It scaffolds a site, serves it, builds it, lints the content, drives the component workshop, collects pages for the central docs site, and wires gated pages to the auth provider. Every command runs from the repo root of the site it acts on.
|
|
8
|
+
`nimpress` is the cli of `@nimtech/nimpress`, a Svelte 5 documentation site framework. It scaffolds a site, serves it, builds it, lints the content, drives the component workshop, collects pages for the central docs site, previews them inside that site, and wires gated pages to the auth provider. Every command runs from the repo root of the site it acts on.
|
|
9
9
|
|
|
10
10
|
## Boundaries
|
|
11
11
|
|
|
12
|
-
1. The cli acts on the current working directory. There is no target flag and no remote mode. Change directory into the site before running anything.
|
|
12
|
+
1. The cli acts on the current working directory. There is no target flag and no remote mode. Change directory into the site before running anything. `view` is the one command that reaches another repo, the central docs site, and it does so through a cache clone it owns.
|
|
13
13
|
|
|
14
|
-
2. Every command except `init`, `skill`,
|
|
14
|
+
2. Every command except `init`, `skill`, `plugin`, `mcp`, `completion`, `view`, and `cache clear` loads the site config first. A missing or broken `nimpress.config.ts` or `nimpress.config.json` fails the command before it starts, so `nimpress init` is what a bare folder runs first. `view` and `cache clear` run from any repo the docs sync pipeline publishes, config or not.
|
|
15
15
|
|
|
16
|
-
3. `nimpress` writes only into the folders the `paths` config block declares. It never writes into the repo root beyond the config, the content folder, `CLAUDE.md`, `AGENTS.md`, and a temporary `index.html` that the build removes.
|
|
16
|
+
3. `nimpress` writes only into the folders the `paths` config block declares. It never writes into the repo root beyond the config, the content folder, `CLAUDE.md`, `AGENTS.md`, and a temporary `index.html` that the build removes. Outside the repo it writes `~/.nimpress` for the links `view` resolves and `~/.tide/nimpress/sites/` for the docs site clones, and nothing else.
|
|
17
17
|
|
|
18
18
|
4. The authoritative authoring rules ship inside the package at `node_modules/@nimtech/nimpress/.claude/rules/`. Read the rule before writing content, never guess the frontmatter contract from a rendered page.
|
|
19
19
|
|
|
@@ -40,9 +40,10 @@ Writes `nimpress.config.ts` with every field documented and commented out, or `n
|
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
42
|
nimpress dev
|
|
43
|
+
nimpress dev --view
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
Serves the site and starts one harness server for every configured component system. It stays running and binds the vite cli shortcuts.
|
|
46
|
+
Serves the site and starts one harness server for every configured component system. It stays running and binds the vite cli shortcuts. `--view` serves the central docs site this repo publishes into instead, with the exported pages in place, the same run as `view` below.
|
|
46
47
|
|
|
47
48
|
### build
|
|
48
49
|
|
|
@@ -100,6 +101,30 @@ nimpress export --target=<name> --out=.nimpress
|
|
|
100
101
|
|
|
101
102
|
Copies every page carrying `export: <name>` in its frontmatter, together with the whole folder that page sits in, into `paths.export`. A page with `export: true` is taken by every target. The `export:` and `file:` frontmatter lines are stripped and a `version:` line is written from the `version` field of `package.json` when the page carries a `package:` field. `--out=` overrides the destination.
|
|
102
103
|
|
|
104
|
+
### view
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
nimpress view
|
|
108
|
+
nimpress view --no-browser
|
|
109
|
+
nimpress view --docs-repo=<owner/repo>
|
|
110
|
+
nimpress view --export-dir=<folder> --target=<name>
|
|
111
|
+
nimpress view --offline
|
|
112
|
+
nimpress dev --view
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Serves the central docs site this repo publishes into with the repo's export folder overlaid at its mapped path, and opens the browser on those pages. It needs no config in the repo. The docs site is read from the `docs-notify` step of the workflows under `.github/workflows/`, `docs-repo` and `export-dir`, one link per site when several name one; where none does, the command asks for the repo url, http or ssh, and `--docs-repo=` answers it up front. A connection that is refused leads to a login through `gh` when installed, else by naming the ssh key. Links and the login method persist in `~/.nimpress`, so the question is asked once per repo. The site is cloned under `~/.tide/nimpress/sites/<owner>__<repo>/`, fetched on every run unless `--offline`, and `pnpm install` runs there on first use and on a lockfile change. The mapped path is `nimpress.sources.json` merged with the receiver's `defaults`, the source winning per field. A repo with its own config runs `export` in watch mode underneath; `nimpress dev --view` is the same run from there. `--no-browser` prints the url instead of opening it, `--export-dir=` names the export folder when no workflow does, and `--target=` limits the export to one target name.
|
|
116
|
+
|
|
117
|
+
### cache
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
nimpress cache clear
|
|
121
|
+
nimpress cache clear --links
|
|
122
|
+
nimpress cache clear --sites
|
|
123
|
+
nimpress cache clear --local
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`clear` with no flag removes the links in `~/.nimpress` and the docs site clones under `~/.tide/nimpress/sites/`, so the next `view` resolves and clones afresh. `--links` and `--sites` take one of the two. `--local` removes `paths.cache` of the current repo and needs a config there.
|
|
127
|
+
|
|
103
128
|
### guard
|
|
104
129
|
|
|
105
130
|
```sh
|
|
@@ -113,6 +138,16 @@ Both read `access.json` from the build folder and fail with `[nimpress] guard: <
|
|
|
113
138
|
|
|
114
139
|
2. `apply` reads the mapping the asset host returned, requires `--map=`, writes the base url and the published asset list back into `access.json`, and removes both the guarded folder and `guard.map.json` from the build.
|
|
115
140
|
|
|
141
|
+
### seo
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
nimpress seo
|
|
145
|
+
nimpress seo --write
|
|
146
|
+
nimpress seo --out=reports/seo.json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Prints one line per page with the route, the keyword count, the description length, whether the robots directive carries `noai`, and whether the values are authored or generated, and writes the full set to `seo.map.json`. `--write` puts the generated keywords and description into each page's frontmatter under `meta`, only where the page has none. `--out=` names the map file.
|
|
150
|
+
|
|
116
151
|
### skill
|
|
117
152
|
|
|
118
153
|
```sh
|
|
@@ -123,6 +158,23 @@ nimpress skill put --project
|
|
|
123
158
|
|
|
124
159
|
`get` prints this document. `put` writes it to `~/.claude/skills/nimpress/SKILL.md`, or to `.claude/skills/nimpress/SKILL.md` under the current directory with `--project`, and prints the path it wrote.
|
|
125
160
|
|
|
161
|
+
### plugin
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
nimpress plugin put
|
|
165
|
+
nimpress plugin put --project
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`put` runs `claude plugin marketplace add nimling/nimpress` and `claude plugin install nimpress@nimpress`, at user scope, or at project scope with `--project`. The plugin carries this skill and the nimpress mcp server. It fails when the `claude` cli is missing or either step exits non zero.
|
|
169
|
+
|
|
170
|
+
### mcp
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
nimpress mcp
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Serves every command as a tool over the model context protocol on stdio. The plugin starts it; nothing else does. Tools are named after the command path with underscores, `lint`, `modules_update`, `guard_map`, and take `args` for positionals, `flags` by flag name without the dashes, and `cwd` relative to the project root. `dev`, `view`, and `modules_dev` keep running and return their pid with the first output; `stop` ends one by pid. `skill`, `plugin`, `mcp`, and `completion` are not tools.
|
|
177
|
+
|
|
126
178
|
### completion
|
|
127
179
|
|
|
128
180
|
```sh
|
|
@@ -191,6 +243,12 @@ Publish a repo's pages into the central docs site:
|
|
|
191
243
|
nimpress export --target=nimployer
|
|
192
244
|
```
|
|
193
245
|
|
|
246
|
+
See those pages inside the central docs site before the tag:
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
nimpress view
|
|
250
|
+
```
|
|
251
|
+
|
|
194
252
|
Ship a gated build:
|
|
195
253
|
|
|
196
254
|
```sh
|
|
@@ -207,7 +265,7 @@ nimpress completion --auto --skill
|
|
|
207
265
|
|
|
208
266
|
## Failure reading
|
|
209
267
|
|
|
210
|
-
1. `[nimpress] unknown command: <name>` means the first word is not one of `init`, `lint`, `dev`, `build`, `guard`, `modules`, `export`, `skill`, `completion`.
|
|
268
|
+
1. `[nimpress] unknown command: <name>` means the first word is not one of `init`, `lint`, `dev`, `build`, `guard`, `modules`, `export`, `skill`, `plugin`, `mcp`, `completion`, `seo`, `view`, `cache`.
|
|
211
269
|
|
|
212
270
|
2. `[nimpress] modules <sub>: several systems configured` means the config declares more than one system and the command needs `--system=<name>`.
|
|
213
271
|
|