Skip to content
DocPensieve
0.2.0

Migrate from 0.1 to 0.2

A project on the 0.1 builds with the 0.2 as it is: every new field is optional. A few things change on their own, though, and deserve a look.

Update

npm install docpensieve@latest

Through npx alone, npx docpensieve fetches the 0.2 by itself. Going back is npm install docpensieve@0.1.5.

What changes on its own

WhatIn 0.2
SearchA field in the header, and a page at /search/ in each version
sitemap.xmlWritten at the root of the site as soon as siteUrl is set
robots.txtWritten with it, when the site is served at the root of its domain
The stylesheetMinified
ImagesTheir width and height are written; all but the first of a page load lazily
Light / dark switchA button in the header, remembered from page to page — a few lines of inline script
theme.darkModeNow read: 'dark' and 'light' keep one scheme, 'class' follows the system

Every page now carries the few lines of the light / dark switch — theme.toggle: false removes them — and the search page loads its own script.

What to check

  • A page of yours at /search/ now stops the build: that address is the search page's. Rename your page, or set search: false.
  • theme.darkMode was accepted and ignored in 0.1. A value other than 'class' now takes effect — and an unknown one stops the build.
  • The light / dark switch is on by default. theme.toggle: false removes it, and with it the only script content pages carry.
  • Your own robots.txt, if you published one next to the site, is now written by the build when the site sits at the root of its domain. Set sitemap: false to keep yours.

What to turn on

FieldGives
sidebar: 'sidebar.json'A menu written by hand, in each version's folder
feed: trueAn RSS feed of the pages that carry a date
versions[].logo, faviconA logo and a favicon of the version's own — a beta told apart
search: falseNo search at all, if the site does not need one

Every field is in the configuration reference.