docpensieve 0.1.5 → 0.2.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.
@@ -36,8 +36,10 @@ utility theme needs to know which classes were actually used.
36
36
 
37
37
  ## React does not leave the build
38
38
 
39
- Components are rendered to HTML during the build. The delivered site loads no
40
- runtime: what reaches the reader is markup and a stylesheet.
39
+ Components are rendered to HTML during the build. Pages load no runtime: what
40
+ reaches the reader is markup and a stylesheet, plus the few lines of the
41
+ light / dark switch; the search page adds a script, of a few kilobytes, to
42
+ filter its list.
41
43
 
42
44
  That explains the shape of the shipped components. None of them has state or
43
45
  an event listener, because there would be nothing to bring them to life.
@@ -0,0 +1,80 @@
1
+ ---
2
+ title: What's new in 0.2
3
+ description: What the 0.2 brings, and what it changes for a 0.1 project.
4
+ tags: [release]
5
+ ---
6
+
7
+ # What's new in 0.2
8
+
9
+ This version is **out**. It is what `npx docpensieve init my-site` installs,
10
+ and what the `latest` pages of this site document:
11
+
12
+ ```bash
13
+ npm install docpensieve@latest
14
+ ```
15
+
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
+ ## Already there
21
+
22
+ ### A menu written by hand
23
+
24
+ `sidebar: 'sidebar.json'` replaces the menu derived from the file tree with
25
+ one you describe — pages in the order you want, categories, links outside the
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.
74
+
75
+ ## For a 0.1 project
76
+
77
+ Nothing to change: a 0.1 configuration builds as it is. `sidebar: 'auto'`
78
+ stays the default, and every new field is optional.
79
+ [Migrate from 0.1 to 0.2](./guide/migrate-from-0-1/) goes through what changes
80
+ on its own, what to check, and what is worth turning on.