docpensieve 0.4.0-beta.2 → 0.4.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/bin/docpensieve.js +5 -2
- package/package.json +5 -5
- package/src/commands/build.js +9 -1
- package/src/commands/dev.js +9 -1
- package/src/commands/init.js +19 -3
- package/starter/01-guide/01-installation.md +2 -3
- package/starter/01-guide/02-first-site.md +7 -1
- package/starter/01-guide/03-writing-pages.md +4 -0
- package/starter/01-guide/04-versions.md +4 -0
- package/starter/01-guide/05-themes.mdx +47 -13
- package/starter/01-guide/07-migrate-from-0-3.md +125 -0
- package/starter/01-guide/08-navigation.mdx +12 -0
- package/starter/01-guide/09-when-it-breaks.md +176 -0
- package/starter/01-guide/10-languages.md +160 -0
- package/starter/02-components/01-card.mdx +2 -2
- package/starter/02-components/02-columns.mdx +3 -0
- package/starter/02-components/03-time-timer.mdx +4 -0
- package/starter/02-components/04-tooltip.mdx +40 -0
- package/starter/02-components/05-tree.mdx +4 -0
- package/starter/02-components/06-scroll-to-top.mdx +3 -0
- package/starter/02-components/07-skill.mdx +30 -0
- package/starter/02-components/08-logo-icon.mdx +24 -0
- package/starter/02-components/09-for-theme.mdx +3 -0
- package/starter/02-components/11-menu.mdx +129 -0
- package/starter/02-components/12-admonition.mdx +154 -0
- package/starter/03-reference/02-configuration.md +50 -32
- package/starter/03-reference/03-frontmatter.md +3 -0
- package/starter/03-reference/04-theme.md +80 -69
- package/starter/03-reference/05-api.md +158 -12
- package/starter/03-reference/index.mdx +3 -0
- package/starter/04-architecture.md +3 -0
- package/starter/05-whats-new.md +73 -19
- package/starter/examples.css +15 -0
- package/starter/01-guide/07-migrate-to-beta.md +0 -27
package/starter/05-whats-new.md
CHANGED
|
@@ -6,33 +6,87 @@ tags: [release]
|
|
|
6
6
|
|
|
7
7
|
# What's new in 0.4
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
while the version installed by default stays the 0.3, documented in the
|
|
11
|
-
`latest` pages of this site:
|
|
9
|
+
The 0.4 is out, and installs by default:
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
|
-
npx docpensieve
|
|
12
|
+
npx docpensieve init my-site
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Each feature below links to the guide and to the reference: this page gathers
|
|
16
|
+
them, it is never the only place something is written.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
its pages are still those of the 0.3. Each feature is announced here as it lands,
|
|
21
|
-
with a link to the guide and to the reference — this page announces, it is never
|
|
22
|
-
the only place something is written.
|
|
18
|
+
## What it brings
|
|
23
19
|
|
|
24
|
-
|
|
20
|
+
The 0.4 turns on the navigation. A site of forty pages was asking its reader to
|
|
21
|
+
scroll past what did not concern them; it can now fold its menu, carry its own
|
|
22
|
+
links in the header, and set a passage apart in the middle of a page.
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[Navigation](./guide/navigation/)
|
|
24
|
+
### A menu that folds
|
|
25
|
+
|
|
26
|
+
`foldedSidebar: true` folds the categories of the documentation menu, and opens
|
|
27
|
+
the branch the reader stands in. On a narrow screen the whole menu folds above
|
|
28
|
+
the content, whatever that setting — nothing to configure for that one. See
|
|
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
|
|
32
39
|
[the configuration reference](./reference/configuration/).
|
|
33
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
|
+
|
|
34
88
|
## For a 0.3 project
|
|
35
89
|
|
|
36
|
-
Nothing to change: a 0.3 configuration builds as it is
|
|
37
|
-
[Migrate from
|
|
38
|
-
its own,
|
|
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.
|
package/starter/examples.css
CHANGED
|
@@ -154,3 +154,18 @@
|
|
|
154
154
|
box-shadow: none;
|
|
155
155
|
padding-inline: 1rem;
|
|
156
156
|
}
|
|
157
|
+
|
|
158
|
+
/* A page menu set apart from the text, for the custom theme */
|
|
159
|
+
|
|
160
|
+
.menu-boxed {
|
|
161
|
+
padding: 0.75rem 1rem;
|
|
162
|
+
border: 1px solid var(--dp-border);
|
|
163
|
+
border-radius: var(--dp-radius);
|
|
164
|
+
background: var(--dp-bg-soft);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* An admonition held apart by a shadow, for the custom theme */
|
|
168
|
+
|
|
169
|
+
.admonition-quiet {
|
|
170
|
+
box-shadow: 0 2px 8px var(--dp-shadow);
|
|
171
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Migrate from latest to beta
|
|
3
|
-
description: Move a project from the latest version, the 0.3, to the 0.4 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.3 — builds with the 0.4 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.4 has just opened. Each change is listed here as it lands,
|
|
24
|
-
beside what it asks of a project already built on the 0.3.
|
|
25
|
-
|
|
26
|
-
One thing changes on its own: on a narrow screen, the menu of the documentation
|
|
27
|
-
now folds above the content instead of standing open. Nothing to configure.
|