docpensieve 0.2.0 → 0.3.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.3.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.3.0-beta.1",
|
|
28
|
+
"@docpensieve/core": "0.3.0-beta.1",
|
|
29
|
+
"@docpensieve/shared": "0.3.0-beta.1",
|
|
30
|
+
"@docpensieve/theme": "0.3.0-beta.1",
|
|
31
31
|
"chalk": "^6.0.0",
|
|
32
32
|
"chokidar": "^5.0.0",
|
|
33
33
|
"commander": "^15.0.0"
|
|
@@ -99,9 +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. To try
|
|
104
|
-
|
|
102
|
+
Coming from the 0.2, [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.
|
|
105
105
|
|
|
106
106
|
## Checking
|
|
107
107
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Migrate from latest to beta
|
|
3
|
+
description: Move a project from the latest version, the 0.2, to the 0.3 beta — what changes on its own, and what to check.
|
|
4
|
+
tags: [guide, migration]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Migrate from latest to beta
|
|
8
|
+
|
|
9
|
+
A project on the latest version — the 0.2 — builds with the 0.3 beta as it is:
|
|
10
|
+
every new field is optional.
|
|
11
|
+
|
|
12
|
+
## Update
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install docpensieve@beta
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Through `npx` alone, `npx docpensieve@beta` runs the beta. Going back is
|
|
19
|
+
`npm install docpensieve@latest`.
|
|
20
|
+
|
|
21
|
+
## What changes on its own
|
|
22
|
+
|
|
23
|
+
Nothing yet: the 0.3 has just opened. Each change is listed here as it lands,
|
|
24
|
+
beside what it asks of a project already built on the 0.2.
|
|
@@ -25,8 +25,8 @@ up.
|
|
|
25
25
|
touching the HTML.
|
|
26
26
|
6. **[Deployment](./deployment/)** — publish, and keep past versions
|
|
27
27
|
online.
|
|
28
|
-
7. **[Migrate from
|
|
29
|
-
the 0.
|
|
28
|
+
7. **[Migrate from latest to beta](./migrate-to-beta/)** — move a 0.2 project
|
|
29
|
+
to the 0.3 beta.
|
|
30
30
|
|
|
31
31
|
## What to know first
|
|
32
32
|
|
package/starter/05-whats-new.md
CHANGED
|
@@ -1,80 +1,28 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: What's new in 0.
|
|
3
|
-
description: What the 0.
|
|
2
|
+
title: What's new in 0.3
|
|
3
|
+
description: What the 0.3 brings, and what it changes for a 0.2 project.
|
|
4
4
|
tags: [release]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# What's new in 0.
|
|
7
|
+
# What's new in 0.3
|
|
8
8
|
|
|
9
|
-
This version is **
|
|
10
|
-
|
|
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.2, documented in the
|
|
11
|
+
`latest` pages of this site:
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
|
-
|
|
14
|
+
npx docpensieve@beta init my-site
|
|
14
15
|
```
|
|
15
16
|
|
|
16
|
-
What follows describes everything it brings, and
|
|
17
|
-
[Migrate from 0.1 to 0.2](./guide/migrate-from-0-1/) says what to check in a
|
|
18
|
-
0.1 project.
|
|
19
|
-
|
|
20
17
|
## Already there
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
site. Each version reads its own file, since each has its own pages. A section
|
|
27
|
-
can keep its automatic menu with a single entry, which is how the DocPensieve
|
|
28
|
-
section stays whole without listing its pages.
|
|
29
|
-
|
|
30
|
-
See [Writing the menu by hand](./guide/writing-pages/) in the guide, and the
|
|
31
|
-
[`sidebar` field](./reference/configuration/) in the reference.
|
|
32
|
-
|
|
33
|
-
### Search engines and feed readers
|
|
34
|
-
|
|
35
|
-
With `siteUrl` set, the build writes `sitemap.xml` for search engines — and
|
|
36
|
-
`robots.txt` when the site sits at the root of its domain. `feed: true` adds an
|
|
37
|
-
RSS feed of the dated pages. See [Sitemap and feed](./reference/configuration/)
|
|
38
|
-
in the reference.
|
|
39
|
-
|
|
40
|
-
### Search
|
|
41
|
-
|
|
42
|
-
A search field in the header, and a search page in each version. The index is
|
|
43
|
-
built with the site, and the field is a plain form: only the search page loads
|
|
44
|
-
a script of its own, and without it the page stays the list of every page. See
|
|
45
|
-
[Search](./reference/configuration/) in the reference.
|
|
46
|
-
|
|
47
|
-
### A colour scheme of your choosing, and a logo per version
|
|
48
|
-
|
|
49
|
-
`theme.darkMode: 'dark'` keeps the site dark whatever the reader's system —
|
|
50
|
-
`'light'` keeps it light; `'class'`, the default, still follows the system.
|
|
51
|
-
Until now the field was accepted and did nothing. A version can also carry its
|
|
52
|
-
own `logo` and `favicon`, to tell a beta apart at a glance. See the
|
|
53
|
-
[configuration reference](./reference/configuration/).
|
|
54
|
-
|
|
55
|
-
### A light / dark switch
|
|
56
|
-
|
|
57
|
-
A button in the header switches between light and dark, and remembers the
|
|
58
|
-
choice from page to page. It is on by default — a few lines of inline script
|
|
59
|
-
in every page; `theme.toggle: false` removes it, and pages then load no script.
|
|
60
|
-
|
|
61
|
-
### Lighter pages
|
|
62
|
-
|
|
63
|
-
The stylesheet reaches the reader minified. Every image of a page gets its
|
|
64
|
-
width and height, read from its file, so that the text no longer jumps when it
|
|
65
|
-
arrives; all but the first load lazily, and are no longer preloaded — the
|
|
66
|
-
first, often in view, keeps its normal loading. `CardImage` loads lazily too.
|
|
67
|
-
|
|
68
|
-
### The API reference, and two example projects
|
|
69
|
-
|
|
70
|
-
Every export of the five packages is in the [API reference](./reference/api/),
|
|
71
|
-
generated from the JSDoc of the sources, so that it cannot drift from the code.
|
|
72
|
-
The repository also holds two complete example projects, one per theme, built
|
|
73
|
-
and checked on every run of its tests.
|
|
19
|
+
Nothing yet: the 0.3 has just opened, and its pages are still those of the 0.2.
|
|
20
|
+
Each feature is announced here as it lands, with a link to the guide and to the
|
|
21
|
+
reference — this page announces, it is never the only place something is
|
|
22
|
+
written.
|
|
74
23
|
|
|
75
|
-
## For a 0.
|
|
24
|
+
## For a 0.2 project
|
|
76
25
|
|
|
77
|
-
Nothing to change: a 0.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
on its own, what to check, and what is worth turning on.
|
|
26
|
+
Nothing to change: a 0.2 configuration builds as it is.
|
|
27
|
+
[Migrate from latest to beta](./guide/migrate-to-beta/) lists what changes on
|
|
28
|
+
its own, what to check, and what is worth turning on.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Migrate from 0.1 to 0.2
|
|
3
|
-
description: Move a project from the 0.1 to the 0.2 — what changes on its own, what to check, what to turn on.
|
|
4
|
-
tags: [guide, migration]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Migrate from 0.1 to 0.2
|
|
8
|
-
|
|
9
|
-
A project on the 0.1 builds with the 0.2 as it is: every new field is
|
|
10
|
-
optional. A few things change on their own, though, and deserve a look.
|
|
11
|
-
|
|
12
|
-
## Update
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install docpensieve@latest
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Through `npx` alone, `npx docpensieve` fetches the 0.2 by itself. Going back
|
|
19
|
-
is `npm install docpensieve@0.1.5`.
|
|
20
|
-
|
|
21
|
-
## What changes on its own
|
|
22
|
-
|
|
23
|
-
| What | In 0.2 |
|
|
24
|
-
| ------------------- | ----------------------------------------------------------------------------------- |
|
|
25
|
-
| Search | A field in the header, and a page at `/search/` in each version |
|
|
26
|
-
| `sitemap.xml` | Written at the root of the site as soon as `siteUrl` is set |
|
|
27
|
-
| `robots.txt` | Written with it, when the site is served at the root of its domain |
|
|
28
|
-
| The stylesheet | Minified |
|
|
29
|
-
| Images | Their width and height are written; all but the first of a page load lazily |
|
|
30
|
-
| Light / dark switch | A button in the header, remembered from page to page — a few lines of inline script |
|
|
31
|
-
| `theme.darkMode` | Now read: `'dark'` and `'light'` keep one scheme, `'class'` follows the system |
|
|
32
|
-
|
|
33
|
-
Every page now carries the few lines of the light / dark switch —
|
|
34
|
-
`theme.toggle: false` removes them — and the search page loads its own script.
|
|
35
|
-
|
|
36
|
-
## What to check
|
|
37
|
-
|
|
38
|
-
- **A page of yours at `/search/`** now stops the build: that address is the
|
|
39
|
-
search page's. Rename your page, or set `search: false`.
|
|
40
|
-
- **`theme.darkMode`** was accepted and ignored in 0.1. A value other than
|
|
41
|
-
`'class'` now takes effect — and an unknown one stops the build.
|
|
42
|
-
- **The light / dark switch** is on by default. `theme.toggle: false` removes
|
|
43
|
-
it, and with it the only script content pages carry.
|
|
44
|
-
- **Your own `robots.txt`**, if you published one next to the site, is now
|
|
45
|
-
written by the build when the site sits at the root of its domain. Set
|
|
46
|
-
`sitemap: false` to keep yours.
|
|
47
|
-
|
|
48
|
-
## What to turn on
|
|
49
|
-
|
|
50
|
-
| Field | Gives |
|
|
51
|
-
| ---------------------------- | ------------------------------------------------------------- |
|
|
52
|
-
| `sidebar: 'sidebar.json'` | A menu written by hand, in each version's folder |
|
|
53
|
-
| `feed: true` | An RSS feed of the pages that carry a `date` |
|
|
54
|
-
| `versions[].logo`, `favicon` | A logo and a favicon of the version's own — a beta told apart |
|
|
55
|
-
| `search: false` | No search at all, if the site does not need one |
|
|
56
|
-
|
|
57
|
-
Every field is in the [configuration reference](../reference/configuration/).
|