docpensieve 0.4.0 → 0.5.0-beta.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docpensieve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-beta.1",
|
|
4
4
|
"description": "DocPensieve command-line interface (init, build, check, dev, serve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"types"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@docpensieve/components": "0.
|
|
28
|
-
"@docpensieve/core": "0.
|
|
29
|
-
"@docpensieve/shared": "0.
|
|
30
|
-
"@docpensieve/theme": "0.
|
|
27
|
+
"@docpensieve/components": "0.5.0-beta.1",
|
|
28
|
+
"@docpensieve/core": "0.5.0-beta.1",
|
|
29
|
+
"@docpensieve/shared": "0.5.0-beta.1",
|
|
30
|
+
"@docpensieve/theme": "0.5.0-beta.1",
|
|
31
31
|
"chalk": "^6.0.0",
|
|
32
32
|
"chokidar": "^5.0.0",
|
|
33
33
|
"commander": "^15.0.0"
|
|
@@ -99,8 +99,9 @@ The documentation `init` installed in `99-docpensieve` stays at the version it
|
|
|
99
99
|
came with. To refresh it, run `init` in a scratch folder and copy that folder
|
|
100
100
|
over.
|
|
101
101
|
|
|
102
|
-
Coming from the 0.
|
|
103
|
-
changes on its own and what to check first.
|
|
102
|
+
Coming from the 0.4, [Migrate from latest to beta](./migrate-to-beta/) says
|
|
103
|
+
what changes on its own and what to check first. To try this beta, install
|
|
104
|
+
`docpensieve@beta`, or run `npx docpensieve@beta` alone.
|
|
104
105
|
|
|
105
106
|
## Checking
|
|
106
107
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Migrate from latest to beta
|
|
3
|
+
description: Move a project from the latest version, the 0.4, to the 0.5 beta — what changes on its own, and what to check.
|
|
4
|
+
tags: [guide, migration]
|
|
5
|
+
|
|
6
|
+
jsonld:
|
|
7
|
+
type: TechArticle
|
|
8
|
+
breadcrumbs: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Migrate from latest to beta
|
|
12
|
+
|
|
13
|
+
A project on the latest version — the 0.4 — builds with the 0.5 beta as it is:
|
|
14
|
+
every field the 0.5 adds is optional.
|
|
15
|
+
|
|
16
|
+
## Update
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install docpensieve@beta
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Through `npx` alone, `npx docpensieve@beta` runs the beta. Going back is
|
|
23
|
+
`npm install docpensieve@latest`.
|
|
24
|
+
|
|
25
|
+
Read your site back once after the update — it is the cheapest check there is:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx docpensieve build
|
|
29
|
+
npx docpensieve check
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What changes on its own
|
|
33
|
+
|
|
34
|
+
Nothing yet: the 0.5 has just opened. Each change is listed here as it lands,
|
|
35
|
+
beside what it asks of a project already built on the 0.4.
|
|
36
|
+
|
|
37
|
+
## What to check afterwards
|
|
38
|
+
|
|
39
|
+
- **Your own CSS**, if the theme folder styles anything the beta touches.
|
|
40
|
+
- **`npx docpensieve check`**, which reads the built site back and reports dead
|
|
41
|
+
links and invalid markup.
|
package/starter/05-whats-new.md
CHANGED
|
@@ -1,92 +1,30 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: What's new in 0.
|
|
3
|
-
description: What the 0.
|
|
2
|
+
title: What's new in 0.5
|
|
3
|
+
description: What the 0.5 brings, and what it changes for a 0.4 project.
|
|
4
4
|
tags: [release]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# What's new in 0.
|
|
7
|
+
# What's new in 0.5
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This version is **in preparation**. Its betas go out under the npm tag `beta`,
|
|
10
|
+
while the version installed by default stays the 0.4, documented in the
|
|
11
|
+
`latest` pages of this site:
|
|
10
12
|
|
|
11
13
|
```bash
|
|
12
|
-
npx docpensieve init my-site
|
|
14
|
+
npx docpensieve@beta init my-site
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
Each feature
|
|
16
|
-
|
|
17
|
+
Each feature is announced here as it lands, with a link to the guide and to the
|
|
18
|
+
reference: this page announces, it is never the only place something is
|
|
19
|
+
written.
|
|
17
20
|
|
|
18
|
-
##
|
|
21
|
+
## Already there
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
links in the header, and set a passage apart in the middle of a page.
|
|
23
|
+
Nothing yet: the 0.5 has just opened. Each feature is listed here as it
|
|
24
|
+
arrives, beside what it asks of a project already built on the 0.4.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
## For a 0.4 project
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
[Navigation](./guide/navigation/).
|
|
30
|
-
|
|
31
|
-
### Links and panels in the header
|
|
32
|
-
|
|
33
|
-
A `headerLinks` entry adds a link beside the version switcher. An entry
|
|
34
|
-
carrying `columns` opens a **panel** of links instead of leading anywhere, so a
|
|
35
|
-
site can navigate from the header alone, from the menu alone, or from both with
|
|
36
|
-
different links. A `version` field points every version at a single one, which
|
|
37
|
-
is how this site leads to its examples. See
|
|
38
|
-
[Navigation](./guide/navigation/) and
|
|
39
|
-
[the configuration reference](./reference/configuration/).
|
|
40
|
-
|
|
41
|
-
### A header held, or not
|
|
42
|
-
|
|
43
|
-
`stickyHeader` decides whether the header holds to the top of the screen or
|
|
44
|
-
scrolls away with the page, giving its height back to the text. It stays held
|
|
45
|
-
by default. See [Navigation](./guide/navigation/).
|
|
46
|
-
|
|
47
|
-
### A menu of links, anywhere in a page
|
|
48
|
-
|
|
49
|
-
The `Menu` component places a row of links where a page needs them — a summary
|
|
50
|
-
at the top of a landing page, the chapters of a guide. Entries can be grouped
|
|
51
|
-
under a title, and the row folds behind a button on a narrow screen, without a
|
|
52
|
-
script. See [Menu](./components/menu/).
|
|
53
|
-
|
|
54
|
-
### Blocks that stand apart
|
|
55
|
-
|
|
56
|
-
`Admonition` sets a passage apart and says how to read it: `note`, `info`,
|
|
57
|
-
`tip`, `attention`, `alert`, `danger`. A project declares **its own kinds** in
|
|
58
|
-
the `admonitions` field — a label and a tone taken from the theme — so the list
|
|
59
|
-
does not have to grow for a team to have the block it needs. See
|
|
60
|
-
[Admonition](./components/admonition/).
|
|
61
|
-
|
|
62
|
-
### Icons from a set
|
|
63
|
-
|
|
64
|
-
`LogoIcon` accepts the name of an icon from a collection, written
|
|
65
|
-
`simple-icons:github`, beside a file of your project. The set is a package your
|
|
66
|
-
project installs and the drawing is placed in the page at the build, like any
|
|
67
|
-
other icon: your reader downloads nothing, and no request leaves their browser.
|
|
68
|
-
An admonition kind takes its mark the same way. See
|
|
69
|
-
[LogoIcon](./components/logo-icon/).
|
|
70
|
-
|
|
71
|
-
### A site in several languages
|
|
72
|
-
|
|
73
|
-
A version declares the folder of each translation:
|
|
74
|
-
|
|
75
|
-
```js
|
|
76
|
-
versions: [
|
|
77
|
-
{ slug: 'latest', name: '1.0', folder: 'docs/v1.0', current: true,
|
|
78
|
-
translations: { fr: 'docs/v1.0-fr' } },
|
|
79
|
-
],
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The language of the site keeps the addresses it has, and a translation is
|
|
83
|
-
served under its code — `/versions/latest/fr/`. The shell follows: English and
|
|
84
|
-
French ship with the tool, and the `ui` field corrects a word or adds a
|
|
85
|
-
language. A page nobody translated is not offered in that language rather than
|
|
86
|
-
served in another. See [Languages](./guide/languages/).
|
|
87
|
-
|
|
88
|
-
## For a 0.3 project
|
|
89
|
-
|
|
90
|
-
Nothing to change: a 0.3 configuration builds as it is, every new field being
|
|
91
|
-
optional. [Migrate from 0.3 to 0.4](./guide/migrate-from-0-3/) lists what
|
|
92
|
-
changes on its own, and what is worth turning on.
|
|
28
|
+
Nothing to change: a 0.4 configuration builds as it is.
|
|
29
|
+
[Migrate from latest to beta](./guide/migrate-to-beta/) lists what changes on
|
|
30
|
+
its own, and what is worth turning on.
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Migrate from 0.3 to 0.4
|
|
3
|
-
description: Move a project from the 0.3 to the 0.4 — what changes on its own, and what to turn on.
|
|
4
|
-
tags: [guide, migration]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Migrate from 0.3 to 0.4
|
|
8
|
-
|
|
9
|
-
A project on the 0.3 builds with the 0.4 as it is: every field the 0.4 adds is
|
|
10
|
-
optional, and leaving them out keeps the site you have.
|
|
11
|
-
|
|
12
|
-
## Update
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install docpensieve@latest
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Through `npx` alone, `npx docpensieve` already runs it.
|
|
19
|
-
|
|
20
|
-
Read your site back once after the update — it is the cheapest check there is:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx docpensieve build
|
|
24
|
-
npx docpensieve check
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## What changes on its own
|
|
28
|
-
|
|
29
|
-
**On a narrow screen, the documentation menu now folds above the content**
|
|
30
|
-
instead of standing open between the header and the text. Nothing to
|
|
31
|
-
configure, and nothing to undo: on a wide screen the menu is unchanged.
|
|
32
|
-
|
|
33
|
-
Nothing else moves. Your pages, your configuration and your theme folder are
|
|
34
|
-
read exactly as before.
|
|
35
|
-
|
|
36
|
-
## What is worth turning on
|
|
37
|
-
|
|
38
|
-
Each of these is one line of `docpensieve.config.mjs`. None depends on
|
|
39
|
-
another.
|
|
40
|
-
|
|
41
|
-
### A menu that folds
|
|
42
|
-
|
|
43
|
-
Past twenty or so pages, a menu that shows everything asks the reader to scroll
|
|
44
|
-
past what does not concern them:
|
|
45
|
-
|
|
46
|
-
```js
|
|
47
|
-
foldedSidebar: true,
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The categories fold, and the branch of the page being read opens on its own.
|
|
51
|
-
A category that is also a page keeps its page as the first entry — the handle
|
|
52
|
-
of a fold cannot be a link.
|
|
53
|
-
|
|
54
|
-
### Links in the header
|
|
55
|
-
|
|
56
|
-
```js
|
|
57
|
-
headerLinks: [
|
|
58
|
-
{ label: 'Blog', href: '/blog/' },
|
|
59
|
-
{ label: 'Repository', href: 'https://example.com/repo' },
|
|
60
|
-
],
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
A target starts from the root of a version, or is a full address. An entry
|
|
64
|
-
carrying `columns` opens a panel instead of leading anywhere; `href` and
|
|
65
|
-
`columns` together are refused, an entry doing one thing or the other.
|
|
66
|
-
|
|
67
|
-
See [Navigation](./navigation/) for the panel and for what happens on a phone.
|
|
68
|
-
|
|
69
|
-
### A header that scrolls away
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
stickyHeader: false,
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The header gives its height back to the text instead of holding to the top of
|
|
76
|
-
the screen. It stays held by default.
|
|
77
|
-
|
|
78
|
-
### Blocks that stand apart
|
|
79
|
-
|
|
80
|
-
Six kinds ship — `note`, `info`, `tip`, `attention`, `alert`, `danger` — and
|
|
81
|
-
need no configuration:
|
|
82
|
-
|
|
83
|
-
```mdx
|
|
84
|
-
<Admonition type="attention">Read this before upgrading.</Admonition>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Kinds of your own take a label and a tone:
|
|
88
|
-
|
|
89
|
-
```js
|
|
90
|
-
admonitions: {
|
|
91
|
-
review: { label: 'To review', tone: 'attention' },
|
|
92
|
-
},
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
A kind nobody declared stops the build rather than rendering a block with no
|
|
96
|
-
colour and no label. See [Admonition](../components/admonition/).
|
|
97
|
-
|
|
98
|
-
### Icons from a set
|
|
99
|
-
|
|
100
|
-
Beside a file of your project, `LogoIcon` accepts the name of an icon from a
|
|
101
|
-
collection:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
npm install --save-dev @iconify-json/simple-icons
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
```mdx
|
|
108
|
-
<LogoIcon src="simple-icons:github" label="Repository" />
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
The set is read at the build and the drawing placed in the page: no request
|
|
112
|
-
leaves your reader's browser. See [LogoIcon](../components/logo-icon/).
|
|
113
|
-
|
|
114
|
-
## What to check afterwards
|
|
115
|
-
|
|
116
|
-
- **Your own CSS**, if the theme folder styles the header or the menu: the
|
|
117
|
-
folded menu adds `details` and `summary` elements where there were only
|
|
118
|
-
links, and a static header no longer carries `position: sticky`.
|
|
119
|
-
- **A link to a heading**, if you turned the sticky header off: the space kept
|
|
120
|
-
above an anchor goes away with it, which is the point.
|
|
121
|
-
- **`npx docpensieve check`**, which reads the built site back and reports dead
|
|
122
|
-
links and invalid markup.
|
|
123
|
-
|
|
124
|
-
None of this is required. A project that turns none of it on is a 0.3 project
|
|
125
|
-
that happens to be running the 0.4.
|