Skip to content
DocPensieve
0.2.0-beta.1

What's new in 0.2

This version is in preparation. Its betas go out under the npm tag beta, while the version installed by default stays the 0.1, documented in the 0.1 pages of this site:

npx docpensieve@beta init my-site

What follows describes the 0.2 as it stands, and Moving from 0.1 to 0.2 says what to check in a 0.1 project.

Already there

A menu written by hand

sidebar: 'sidebar.json' replaces the menu derived from the file tree with one you describe — pages in the order you want, categories, links outside the site. Each version reads its own file, since each has its own pages. A section can keep its automatic menu with a single entry, which is how the DocPensieve section stays whole without listing its pages.

See Writing the menu by hand in the guide, and the sidebar field in the reference.

Search engines and feed readers

With siteUrl set, the build writes sitemap.xml for search engines — and robots.txt when the site sits at the root of its domain. feed: true adds an RSS feed of the dated pages. See Sitemap and feed in the reference.

A search field in the header, and a search page in each version. The index is built with the site; content pages still load no script — the search page alone does, and without it the page stays the list of every page. See Search in the reference.

A colour scheme of your choosing, and a logo per version

theme.darkMode: 'dark' keeps the site dark whatever the reader's system — 'light' keeps it light; 'class', the default, still follows the system. Until now the field was accepted and did nothing. A version can also carry its own logo and favicon, to tell a beta apart at a glance. See the configuration reference.

Lighter pages

The stylesheet reaches the reader minified. Every image of a page gets its width and height, read from its file, so that the text no longer jumps when it arrives; all but the first load lazily, and are no longer preloaded — the first, often in view, keeps its normal loading. CardImage loads lazily too.

The API reference, and two example projects

Every export of the five packages is in the API reference, generated from the JSDoc of the sources, so that it cannot drift from the code. The repository also holds two complete example projects, one per theme, built and checked on every run of its tests.

For a 0.1 project

Nothing to change: a 0.1 configuration builds as it is. sidebar: 'auto' stays the default, and every new field is optional. A guide to moving from 0.1 to 0.2 will come with the release.