Nibble 0.17.0
What’s new
- Updates shows ten releases at a time, with Load more for the next ten, which light up for a moment as they arrive. The list of releases is read a page at a time, and only as far as the release a site runs.
- A paginated query can scroll.
paginate: { scroll: true }makes each page append to the last, for Inertia’sInfiniteScroll. - Publishing a dated entry with no publish date publishes it now. The date is stamped at that moment, as it already was for undated collections, instead of refusing until one is typed in.
- Publish changes can skip its message. The arrow beside the button offers Ask for a message or Publish straight away, remembered per person like the choice after saving.
- An entry can leave search. Every entry of a searched collection has an Include in search toggle in its
sidebar, on unless someone turns it off; a page written as a file says
search: falsein its front matter. A blueprint with its ownsearchfield keeps it, and gets no toggle. - A search query can narrow by collection.
where: { collection: docs }(orin:a list, or$params.section) on asearch:source searches part of an index, so one index serves a site-wide search and a docs-only one. - A query can ask for a record’s
parent, its title and address, so a search result can say which section it sits in. It is looked up only whenfieldsnames it. - A new site lints and formats what it owns.
npm run lintruns ESLint over its themes and the screens it ejected, including the rule that a theme imports only@nibble,@theme, relative paths and its own dependencies;npm run formatandnpm run format:checkrun Prettier in Nibble’s style. - Every email has a heading, and a button when there is something to do. Invitations, password resets, form
submissions and notifications are rewritten for the person reading them, and drawn in one layout that styles plain
HTML. A site restyles them all with its own
app/views/layouts/mailer.html.erb; the Emails guide lists what each one uses. A form submission says to reply only when a reply reaches the visitor.
What’s fixed
- Search snippets read as text, not Markdown:
**, links and image syntax no longer show around the match. - A page written as a file is indexed once. Its words were stored twice, which ranked it above an entry saying the same thing.
- A view that asks for
parenttype-checks. The generated types picked it from the record, which has no such key, sosite/types.d.tsfailed to compile; it is typed asParentSummarynow. - A theme from
nibble:generate:themepasses the format check, starting with itstheme.yml. nibble:checkno longer reports a sidebar taxonomy or the search toggle as removed. Both are kept on an entry beside its blueprint, and the check only knew the blueprint’s own fields.- The generated types follow the theme a development server renders, written as it starts, so an editor checks a theme against its own schema rather than whichever theme wrote the types last.
- A site’s
.gitignorekeeps outvendor/nibble/Gemfile.lock, which some editors write beside Nibble’sGemfile. Upgrade: accept the.gitignorethe upgrade offers.
Changed
One change waits for load_defaults: "0.17.0":
- An index is made of the collections and taxonomies that name it, with
search: <index>in their own files.search.ymlkeeps each index’s settings, such asfields; itscollectionsandtaxonomieslists are no longer read, andbin/rails nibble:checkreports one that is still there. Taxonomies acceptsearch:from this release.
Upgrade: to lint an existing site, copy eslint.config.js and prettier.config.js from
vendor/nibble/templates/ into the site’s root, and the lint, format and format:check scripts from
vendor/nibble/templates/package.json.erb into its package.json. The search index gains a column, so this release
recreates it, and nibble:prepare rebuilds it on the deploy that follows. Before raising load_defaults to
"0.17.0", give every collection and taxonomy listed in your search.yml a search: <index> key of its own, and
remove the lists.