docpensieve 0.1.0 → 0.1.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 +5 -2
- package/bin/docpensieve.js +1 -0
- package/package.json +8 -6
- package/src/commands/dev.js +1 -1
- package/src/commands/init.js +214 -39
- package/starter/01-guide/01-installation.md +79 -0
- package/starter/01-guide/02-first-site.md +97 -0
- package/starter/01-guide/03-writing-pages.md +138 -0
- package/starter/01-guide/04-versions.md +179 -0
- package/starter/01-guide/05-themes.md +116 -0
- package/starter/01-guide/06-deployment.md +124 -0
- package/starter/01-guide/index.md +38 -0
- package/starter/02-components/01-card.mdx +195 -0
- package/starter/02-components/02-columns.mdx +193 -0
- package/starter/02-components/03-time-timer.mdx +120 -0
- package/starter/02-components/04-tooltip.mdx +100 -0
- package/starter/02-components/05-tree.mdx +163 -0
- package/starter/02-components/06-scroll-to-top.mdx +103 -0
- package/starter/02-components/07-skill.mdx +214 -0
- package/starter/02-components/08-logo-icon.mdx +122 -0
- package/starter/02-components/icons/banner.svg +15 -0
- package/starter/02-components/icons/book.svg +4 -0
- package/starter/02-components/icons/lightning.svg +3 -0
- package/starter/02-components/icons/shield.svg +4 -0
- package/starter/02-components/icons/star.svg +3 -0
- package/starter/02-components/index.md +41 -0
- package/starter/03-reference/01-cli.md +134 -0
- package/starter/03-reference/02-configuration.md +132 -0
- package/starter/03-reference/03-frontmatter.md +110 -0
- package/starter/03-reference/04-theme.md +149 -0
- package/starter/03-reference/index.md +32 -0
- package/starter/04-architecture.md +106 -0
- package/starter/icons/blocks.svg +6 -0
- package/starter/icons/book.svg +4 -0
- package/starter/icons/branch.svg +6 -0
- package/starter/icons/compass.svg +4 -0
- package/starter/icons/lightning.svg +3 -0
- package/starter/icons/list.svg +4 -0
- package/starter/icons/shield.svg +4 -0
- package/starter/icons/star.svg +3 -0
- package/starter/index.mdx +244 -0
- package/types/commands/init.d.ts +7 -4
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: DocPensieve
|
|
3
|
+
description: Static documentation site generator — Markdown and MDX in, runtime-free HTML out, one version per branch.
|
|
4
|
+
layout: home
|
|
5
|
+
authors: [Valentin Chevoleau]
|
|
6
|
+
date: 2026-09-09
|
|
7
|
+
tags: [home]
|
|
8
|
+
draft: false
|
|
9
|
+
|
|
10
|
+
jsonld:
|
|
11
|
+
type: TechArticle
|
|
12
|
+
breadcrumbs: false
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<div className="dp-hero">
|
|
16
|
+
|
|
17
|
+
# DocPensieve
|
|
18
|
+
|
|
19
|
+
Your Markdown and MDX files become a static site. No runtime to load, one version per branch, structured data derived from the frontmatter.
|
|
20
|
+
|
|
21
|
+
<div className="dp-actions">
|
|
22
|
+
|
|
23
|
+
[Get started](/guide/installation/) [See the components](/components/)
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<Columns>
|
|
30
|
+
<Column>
|
|
31
|
+
<Card className="h-full" href="/guide/">
|
|
32
|
+
<CardBody className="text-sm text-slate-600 dark:text-slate-400">
|
|
33
|
+
<LogoIcon src="./icons/compass.svg" size="1.75rem" className="text-indigo-600" />
|
|
34
|
+
<strong className="block mt-3 mb-1 text-base font-semibold">Guide</strong>
|
|
35
|
+
|
|
36
|
+
From installation to deployment, in order.
|
|
37
|
+
</CardBody>
|
|
38
|
+
</Card>
|
|
39
|
+
|
|
40
|
+
</Column>
|
|
41
|
+
<Column>
|
|
42
|
+
<Card className="h-full" href="/components/">
|
|
43
|
+
<CardBody className="text-sm text-slate-600 dark:text-slate-400">
|
|
44
|
+
<LogoIcon src="./icons/blocks.svg" size="1.75rem" className="text-indigo-600" />
|
|
45
|
+
<strong className="block mt-3 mb-1 text-base font-semibold">Components</strong>
|
|
46
|
+
|
|
47
|
+
Eight components usable without an import, none of them with JavaScript.
|
|
48
|
+
</CardBody>
|
|
49
|
+
</Card>
|
|
50
|
+
|
|
51
|
+
</Column>
|
|
52
|
+
<Column>
|
|
53
|
+
<Card className="h-full" href="/reference/">
|
|
54
|
+
<CardBody className="text-sm text-slate-600 dark:text-slate-400">
|
|
55
|
+
<LogoIcon src="./icons/list.svg" size="1.75rem" className="text-indigo-600" />
|
|
56
|
+
<strong className="block mt-3 mb-1 text-base font-semibold">Reference</strong>
|
|
57
|
+
|
|
58
|
+
Commands, configuration, frontmatter and theme.
|
|
59
|
+
</CardBody>
|
|
60
|
+
</Card>
|
|
61
|
+
|
|
62
|
+
</Column>
|
|
63
|
+
<Column>
|
|
64
|
+
<Card className="h-full" href="/architecture/">
|
|
65
|
+
<CardBody className="text-sm text-slate-600 dark:text-slate-400">
|
|
66
|
+
<LogoIcon src="./icons/branch.svg" size="1.75rem" className="text-indigo-600" />
|
|
67
|
+
<strong className="block mt-3 mb-1 text-base font-semibold">Architecture</strong>
|
|
68
|
+
|
|
69
|
+
How a page becomes HTML, and why it works that way.
|
|
70
|
+
</CardBody>
|
|
71
|
+
</Card>
|
|
72
|
+
|
|
73
|
+
</Column>
|
|
74
|
+
</Columns>
|
|
75
|
+
|
|
76
|
+
## In three commands
|
|
77
|
+
|
|
78
|
+
<Columns>
|
|
79
|
+
<Column span={7}>
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx docpensieve init my-site
|
|
83
|
+
cd my-site
|
|
84
|
+
npx docpensieve dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The first one sets up a configuration and a documentation folder, the last one
|
|
88
|
+
opens a server that rebuilds on every save.
|
|
89
|
+
|
|
90
|
+
Nothing else to install: the <Tooltip text="Turning the sources into HTML pages ready to serve.">build</Tooltip> runs on your machine, and the produced site only needs a file host.
|
|
91
|
+
|
|
92
|
+
</Column>
|
|
93
|
+
<Column span={5}>
|
|
94
|
+
<Card className="h-full">
|
|
95
|
+
<CardHeader>What you get</CardHeader>
|
|
96
|
+
<CardBody>
|
|
97
|
+
<Tree>
|
|
98
|
+
<TreeItem label="dist" open>
|
|
99
|
+
<TreeItem label="index.html" />
|
|
100
|
+
<TreeItem label="versions.json" />
|
|
101
|
+
<TreeItem label="versions" open>
|
|
102
|
+
<TreeItem label="v1.0">
|
|
103
|
+
<TreeItem label="index.html" />
|
|
104
|
+
<TreeItem label="assets" />
|
|
105
|
+
</TreeItem>
|
|
106
|
+
</TreeItem>
|
|
107
|
+
</TreeItem>
|
|
108
|
+
</Tree>
|
|
109
|
+
</CardBody>
|
|
110
|
+
</Card>
|
|
111
|
+
</Column>
|
|
112
|
+
</Columns>
|
|
113
|
+
|
|
114
|
+
## What it costs the reader
|
|
115
|
+
|
|
116
|
+
<div className="flex flex-wrap justify-center gap-6 my-8">
|
|
117
|
+
<Skill
|
|
118
|
+
name="JavaScript"
|
|
119
|
+
level={0}
|
|
120
|
+
shape="circle"
|
|
121
|
+
color="#10b981"
|
|
122
|
+
icon={<LogoIcon src="./icons/lightning.svg" />}
|
|
123
|
+
/>
|
|
124
|
+
<Skill
|
|
125
|
+
name="Hydration"
|
|
126
|
+
level={0}
|
|
127
|
+
shape="circle"
|
|
128
|
+
color="#10b981"
|
|
129
|
+
icon={<LogoIcon src="./icons/lightning.svg" />}
|
|
130
|
+
/>
|
|
131
|
+
<Skill
|
|
132
|
+
name="HTML served as is"
|
|
133
|
+
level={100}
|
|
134
|
+
shape="circle"
|
|
135
|
+
color="#6366f1"
|
|
136
|
+
icon={<LogoIcon src="./icons/shield.svg" />}
|
|
137
|
+
/>
|
|
138
|
+
<Skill
|
|
139
|
+
name="One stylesheet per version"
|
|
140
|
+
level={100}
|
|
141
|
+
shape="circle"
|
|
142
|
+
color="#6366f1"
|
|
143
|
+
icon={<LogoIcon src="./icons/book.svg" />}
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
Two dials at zero, and that is on purpose: React serves the **build**, not the
|
|
148
|
+
display. What reaches the reader is markup and a stylesheet.
|
|
149
|
+
|
|
150
|
+
## What sets the tool apart
|
|
151
|
+
|
|
152
|
+
<Columns>
|
|
153
|
+
<Column span={6}>
|
|
154
|
+
<Card className="h-full">
|
|
155
|
+
<CardHeader>Nothing to load</CardHeader>
|
|
156
|
+
<CardBody className="text-sm">
|
|
157
|
+
No hydration, no bundle to download before reading. A page stays readable in ten years,
|
|
158
|
+
because there is nothing that can stop working.
|
|
159
|
+
</CardBody>
|
|
160
|
+
</Card>
|
|
161
|
+
</Column>
|
|
162
|
+
<Column span={6}>
|
|
163
|
+
<Card className="h-full">
|
|
164
|
+
<CardHeader>One version per branch</CardHeader>
|
|
165
|
+
<CardBody className="text-sm">
|
|
166
|
+
Each published version lives on its own orphan branch, with its history. Going back to an
|
|
167
|
+
old version does not require rebuilding it.
|
|
168
|
+
</CardBody>
|
|
169
|
+
</Card>
|
|
170
|
+
</Column>
|
|
171
|
+
<Column span={6}>
|
|
172
|
+
<Card className="h-full">
|
|
173
|
+
<CardHeader>The frontmatter is enough</CardHeader>
|
|
174
|
+
<CardBody className="text-sm">
|
|
175
|
+
Title, description, authors and dates produce the JSON-LD, the breadcrumb and the metadata.
|
|
176
|
+
Nothing to write twice.
|
|
177
|
+
</CardBody>
|
|
178
|
+
</Card>
|
|
179
|
+
</Column>
|
|
180
|
+
<Column span={6}>
|
|
181
|
+
<Card className="h-full">
|
|
182
|
+
<CardHeader>Nothing fails silently</CardHeader>
|
|
183
|
+
<CardBody className="text-sm">
|
|
184
|
+
An unknown value, a missing parent, a dead link: each one stops the build with a message and
|
|
185
|
+
a hint.
|
|
186
|
+
</CardBody>
|
|
187
|
+
</Card>
|
|
188
|
+
</Column>
|
|
189
|
+
</Columns>
|
|
190
|
+
|
|
191
|
+
## Quality, in figures
|
|
192
|
+
|
|
193
|
+
<Columns>
|
|
194
|
+
<Column span={7}>
|
|
195
|
+
|
|
196
|
+
These gauges are not decorative: they are the repository's own measurements,
|
|
197
|
+
taken by hand — nothing updates them on its own. <Tooltip text="Share of lines executed by the test suite.">Coverage</Tooltip> and <Tooltip text="TypeScript checks the JSDoc of the source code and of the tests.">typing</Tooltip> are checked on every push.
|
|
198
|
+
|
|
199
|
+
What is not measured does not improve — and what is not checked every time
|
|
200
|
+
degrades.
|
|
201
|
+
|
|
202
|
+
</Column>
|
|
203
|
+
<Column span={5}>
|
|
204
|
+
<Skill name="Line coverage" level={97} color="#10b981" icon={<LogoIcon src="./icons/shield.svg" />} />
|
|
205
|
+
<Skill name="Branch coverage" level={87} color="#f59e0b" icon={<LogoIcon src="./icons/shield.svg" />} />
|
|
206
|
+
<Skill name="Typing of code and tests" level={100} color="#6366f1" icon={<LogoIcon src="./icons/star.svg" />} />
|
|
207
|
+
</Column>
|
|
208
|
+
</Columns>
|
|
209
|
+
|
|
210
|
+
## A page, end to end
|
|
211
|
+
|
|
212
|
+
<Columns>
|
|
213
|
+
<Column span={5}>
|
|
214
|
+
|
|
215
|
+
```mdx
|
|
216
|
+
---
|
|
217
|
+
title: Installation
|
|
218
|
+
description: Install the tool.
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
# Installation
|
|
222
|
+
|
|
223
|
+
Node.js 22 or later.
|
|
224
|
+
|
|
225
|
+
<Tooltip text="Complete new project">init</Tooltip>
|
|
226
|
+
sets up the configuration.
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
</Column>
|
|
230
|
+
<Column span={7}>
|
|
231
|
+
|
|
232
|
+
The file is read, its frontmatter detached, its content compiled to HTML.
|
|
233
|
+
Components are rendered **at build time**: `Tooltip` becomes two elements and a
|
|
234
|
+
style rule, without a line of script.
|
|
235
|
+
|
|
236
|
+
The title feeds the `<title>` tag, the description the metadata, and both
|
|
237
|
+
together the JSON-LD. The file name gives the URL, its folder the place in the
|
|
238
|
+
menu.
|
|
239
|
+
|
|
240
|
+
None of this needs configuration: [writing a page](/guide/writing-pages/) is
|
|
241
|
+
enough.
|
|
242
|
+
|
|
243
|
+
</Column>
|
|
244
|
+
</Columns>
|
package/types/commands/init.d.ts
CHANGED
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* @param {string} [dir] Target folder, created if needed.
|
|
10
10
|
* @param {{
|
|
11
11
|
* name?: string, theme?: string, siteUrl?: string, version?: string,
|
|
12
|
-
* yes?: boolean, force?: boolean,
|
|
13
|
-
* }} [options]
|
|
14
|
-
* @returns {Promise<{ dir: string, theme: string }>}
|
|
15
|
-
* @throws {DocPensieveError} Unknown framework,
|
|
12
|
+
* yes?: boolean, force?: boolean, minimal?: boolean,
|
|
13
|
+
* }} [options] `minimal` leaves DocPensieve's documentation out of the site.
|
|
14
|
+
* @returns {Promise<{ dir: string, theme: string, docs: boolean }>}
|
|
15
|
+
* @throws {DocPensieveError} Unknown framework, project already initialised,
|
|
16
|
+
* or documentation to install missing.
|
|
16
17
|
*/
|
|
17
18
|
export declare function init(dir?: string, options?: {
|
|
18
19
|
name?: string;
|
|
@@ -21,7 +22,9 @@ export declare function init(dir?: string, options?: {
|
|
|
21
22
|
version?: string;
|
|
22
23
|
yes?: boolean;
|
|
23
24
|
force?: boolean;
|
|
25
|
+
minimal?: boolean;
|
|
24
26
|
}): Promise<{
|
|
25
27
|
dir: string;
|
|
26
28
|
theme: string;
|
|
29
|
+
docs: boolean;
|
|
27
30
|
}>;
|