Skip to content

v1.0.0 Beta 8

Compare
Choose a tag to compare
@paulrobertlloyd paulrobertlloyd released this 03 Mar 20:11
· 407 commits to main since this release
c34ec50

Indiekit’s first beta release of 2024 is a fairly substantial one. Largely focused on post type configuration, it contains a breaking change in this area.

It also improves the onboarding experience and documentation, and includes a number of bug fixes. Read on to learn more.

🚨 BREAKING CHANGES

Post type configuration

To aid the introduction of post type plug-ins, post type configuration has changed. You can read more about the decision in this ADR, but in short, Indiekit now expects a keyed collection of objects instead of an array:

// Before
postTypes: [
  {
    type: "note",
    post: {
      path: "notes/{yyyy}-{MM}-{dd}-{slug}.markdown",
      url: "notes/{yyyy}/{DDD}/a{n}/{slug}/",
    }
  }
]

// After
postTypes: {
  note: {
     post: {
       path: "notes/{yyyy}-{MM}-{dd}-{slug}.markdown",
       url: "notes/{yyyy}/{DDD}/a{n}/{slug}/",
     }
   }
}

Presets

If you are using the Hugo or Jekyll presets, there may be some slight changes in output, as post templates now output all provided properties (except those prefixed with mp-*). However, in most cases there should be no difference.

In addition, in order to better conform with Jekyll’s preference for front matter keys, these now use snake_case instead of kebab-case:

---
date: 2024-03-03
- like-of: https://getindiekit.com
+ like_of: https://getindiekit.com
---

(That Eleventy tends to favour camelCase for its properties might be the nudge I need to create a specific preset for that static generator.)

✨ New features

🔌 Post type plugins

Turns out that publication presets were doing a lot of heavy lifting, and dictating more of the publishing pipeline than I intended. In fact, a number of assumptions around post types had been baked into various different parts of the application.

Post type plug-ins attempt to abstract a lot of this behaviour, and in doing so, make this aspect of Indiekit more customisable. They allow plug-in authors to:

  • Determine a post type’s name
  • Dictate which properties a post type has (and which are required)
  • Provide means of creating and editing properties in Indiekit’s interface, and validate fields before form submission

These features are available via the new Indiekit.addPostType API.

In addition to adapting the existing post-types into plug-ins (for which article, bookmark, like, note, photo and reply are installed by default), 2 new post types have been added:

  1. @indiekit/post-type-event allows you to add event posts to your website.
  2. @indiekit/post-type-jam enables posting music you are currently listening to.

🔢 Character count

The content field in the editing interface now includes a character and word count. This follows a similar design to that used by the GOV.UK design system, that includes a delay before announcing updated counts to screen reader users. (#697)

🇸🇪 Swedish localisation

Thanks to @carlrafting for translating Indiekit into Swedish, bringing the number of available localisations up to 12.

Improvements and bug fixes

First run

  • npm create indiekit would incorrectly report the minimum supported Node version, this has now been fixed. Thanks to @jphastings for reporting (#674).
  • Any issues discovered while creating a MongoDB connection or connecting to a database are now reported in the interface. Thanks to @jackdbd for reporting and suggesting a fix (#690).
  • The MongoDB database name can now be configured in the connection string. Thanks to @jphastings for reporting (#681).

Publishing

  • Indiekit will now fetch references for form-encoded Micropub requests. Thanks to @aciccarello for reporting (#671).
  • Indiekit will no longer throw an error when generating a JF2 feed. Thanks to @aciccarello for reporting (#676).
  • Indiekit will now accept a publish date in form-encoded Micropub requests. Thanks to @jackdbd for reporting (#691).

Documentation

  • API documentation now follows a format that is closer to that used on MDN (#699).
  • Sections around configuration have been reorganised and expanded (#701).

Thanks to feedback from @kwaa and @davepeck in this area (#652).

Plug-ins

  • Plug-in authors no longer need to provide id or meta properties on the plug-in constructor (#698).

Chores

  • Replaced AVA with Node.js test runner
  • Replaced C8 with Node.js test coverage reporter

💟 Indiekit is supported by its community. This release was sponsored by @abhas, @sentience and @roobottom.


Features

  • endpoint-files: close file properties (e2e8faf)
  • endpoint-media: log CRUD operations (9e7b0e2)
  • endpoint-media: update link to documentation (13ad159)
  • endpoint-micropub: add custom types to post type discovery (1aec035)
  • endpoint-micropub: add jam to post type discovery (91eeae6)
  • endpoint-micropub: log CRUD operations (06c7785)
  • endpoint-micropub: query supported post type properties (feadee6)
  • endpoint-micropub: remove server commands from post template properties (128299c)
  • endpoint-micropub: update link to documentation (5bee191)
  • endpoint-posts: close post properties (1941232)
  • endpoint-posts: delete non-mf2 post values (5a6cc36)
  • endpoint-posts: display all property values for a post (07e9a94)
  • endpoint-posts: event post fields (0deba98)
  • endpoint-posts: make visibility optional (6ddb244)
  • endpoint-posts: new form validation (9d9703d)
  • endpoint-posts: only show fields for supported properties (650791b)
  • endpoint-posts: sanitise submitted post values (ebb0f95)
  • endpoint-posts: show character and word count on content field (ba769f9)
  • endpoint-posts: use validation schema from post type config (aa348c8)
  • endpoint-share: adjust share bookmarklet width and height (c08ee0e)
  • frontend: add border to inline fieldset (fe30dc1)
  • frontend: add items conditional to checkbox and radio components (28892be)
  • frontend: additional prose styles (14188fc)
  • frontend: allow radios to be marked as optional (5a39225)
  • frontend: character count component (621d582)
  • frontend: cross, location and tick icons (48ac368)
  • frontend: event duration component (d126e61)
  • frontend: isArray filter (41060db)
  • frontend: jam post icon (9b5bc48)
  • frontend: resize share preview window to fit form (5f95f51)
  • frontend: simplify minimal ui layout on narrower viewports (925ebbf)
  • frontend: split offset and group fieldset modifiers (435ea84)
  • frontend: tag component (bf04eb9)
  • frontend: update app icon (b73cf33)
  • frontend: use normal font style for citations (048635c)
  • indiekit: add default post type properties (1368667)
  • indiekit: default h value to entry (77f8d70)
  • indiekit: gracefully shutdown server (bbf2f8b)
  • indiekit: improve mongo connection error notifications (c42225b)
  • indiekit: keep ‘indiekit’ as default database name (78ac4a8)
  • indiekit: remove superfluous heading on plug-in view (c9d572c)
  • indiekit: remove theme_color from web app manifest (ef9f019)
  • indiekit: translate plug-in options heading (5975b61)
  • indiekit: update app icon (6a98b44)
  • indiekit: update link to documentation (ded4559)
  • post-type-jam: add locales (a7ab137)
  • post-type-rsvp: update locales (02de8b5)
  • preset-hugo: accept unknown post properties (f7ccce9)
  • preset-hugo: support configured post types (e0ce1ed)
  • preset-jekyll: accept unknown post properties (adbfc2a)
  • preset-jekyll: support configured post types (e3891fa)
  • preset-jekyll: use snake_case for front matter property keys (8e9736e)
  • util: isDate (ae7b907)
  • util: regex for geographic location coordinates (1eb1456)
  • util: sanitise (2c91f5d)
  • util: validation schemes (833a3b7)
  • move post type validation into plug-ins via api method (7e396bf)
  • move post types into plug-ins (841bce1)
  • remove need for plugins to provide id value (a866ec0)
  • remove need for plugins to provide meta value (833893e)
  • add swedish localisation from @carlrafting (37f2124)

Bug Fixes

  • create: update minimum supported node version (530f25a)
  • endpoint-auth: only show error if message (176fc47)
  • endpoint-micropub: discard items in posts collection without properties (3937452)
  • endpoint-micropub: don’t decode date strings in query parameters (4c6198e)
  • endpoint-micropub: don’t send post-type property to template (bdb1fb3)
  • endpoint-micropub: fetch references for form-encoded requests (a3ad0fa)
  • endpoint-micropub: files list in package.json (f4bab79)
  • endpoint-micropub: post template properties (0eb3fd5)
  • endpoint-posts: add width class to published date input (fc21a27)
  • endpoint-posts: check all day if event date has no time (9c6c4b1)
  • endpoint-posts: don’t return useless location property (0778519)
  • endpoint-posts: index value in media post fields (cc6dc9a)
  • endpoint-posts: inline radios (a2da82c)
  • endpoint-posts: reading/editing geographic coordinates (f28325a)
  • endpoint-posts: use option to enable inline radios (dbcef51)
  • frontend: adjust icon spacing in badge component (717817b)
  • frontend: conditional checkbox and radio inline padding (c39017d)
  • frontend: details spacing (e493f85)
  • frontend: error colors with dark scheme (ccc68be)
  • frontend: error message spacing (ba2761e)
  • frontend: event-duration spacing (dc211b9)
  • frontend: field spacing in fieldset group (771e5c5)
  • frontend: focused text colour for detail summary (cc67ab8)
  • frontend: force datetime input height on iOS (d1ea3db)
  • frontend: head order (3968e06)
  • frontend: hint spacing (28cf9a2)
  • frontend: label typography (0c3a37d)
  • frontend: mark title in card component as safe (3b374ac)
  • frontend: more specific selector for tag component styles (da5db8c)
  • frontend: only add aria-labelledby if section has title (db7ea28)
  • frontend: only add aria-labelledby if widget has title (8565cbf)
  • frontend: only apply min-block-size to authorize component when it contains client icon (c3bbd6c)
  • frontend: prevent horizontal scrolling (54d2850)
  • frontend: remove any errors when cloning another item (0a38ff9)
  • frontend: remove width on datetime-local input (e175dd1)
  • frontend: show full error name in notification banner (b21db87)
  • frontend: tag input input width (9c0a9fe)
  • frontend: use fixed value for xs space (6e64bd5)
  • frontend: use option to enable inline radios (b22d42b)
  • indiekit: add default post type dependencies (48b586e)
  • indiekit: add post type name if not provided (dedae13)
  • indiekit: check for database before querying for posts (f957218)
  • indiekit: get localised plug-in strings from response.locals (8858ba4)
  • indiekit: log don’t throw request cache errors (16877da)
  • internet-archive: correct option name for secretKey (f3231c5)
  • post-type-like: update swedish localisation (7aeb994)
  • util: validate that media item is url (194c291)
  • provide add another list in caller (5f8f33e)
  • show localised date in cards (f03f608)