Skip to content

Servitor CMS 0.4.0

Latest

Choose a tag to compare

@justhasanuknow justhasanuknow released this 16 Oct 00:29
84e9b3d

Servitor now manages cards: products, events or listings built from card types with the fields you define, written in the post editor with the same translations and review as posts, and served to your sites through the API with filters on any shared field. The editor also leaves room below the text while you write.

Added

  • Card types under Content → Card types: staff define the fields of a type, such as text, numbers, prices with a currency, choices, yes or no, links and dates, and start from a ready-made product structure or from an empty one. Each field can be required, and text fields can have a separate value per language.
  • Cards under Content → Cards: each card is created from a card type and written in the post editor, with the same translations, revisions, review, scheduling and moderation as posts. The new Card tab holds the fields of the type, with per-language values saved in the draft and shared values for all translations, and a gallery of up to 20 images. A card is published once it has a title and every required field. Cards stay out of the post list, the blog and the post API.
  • Webhook events for cards: card.published, card.updated, card.unpublished, card.hidden, card.unhidden and card.deleted, with card_id and card_type in the body.
  • Cards in the REST API: GET /api/v1/cards with filters for the type, category, tag and the values of shared fields, including ranges for numbers, prices and dates, and sorting by a field; GET /api/v1/cards/{id}, GET /api/v1/cards/by-slug/{lang}/{slug} and GET /api/v1/card-types. The OpenAPI document describes them.

Changed

  • The post editor leaves room below the text and scrolls before the cursor reaches the bottom of the screen, so the line you write can stay near the middle.

Upgrading from 0.3.x

Take a backup first:

docker compose exec servitor node build/cli.js backup

Then set SERVITOR_VERSION=0.4 in your .env and pull the new image:

docker compose pull
docker compose up -d

Three migrations run on start. They add the card types, the card fields of posts and revisions and the gallery, and rebuild the webhook delivery table so that it accepts the card events; waiting and failed deliveries and their attempts are kept. Existing webhooks keep their events: subscribe a webhook to the card.* events to be notified about cards. The post endpoints of the API and the blog are unchanged and never return cards.

The image for linux/amd64 and linux/arm64 is ghcr.io/rua-systems/servitor-cms:0.4.0 (also 0.4 and latest). Verify it with the GitHub CLI:

gh attestation verify oci://ghcr.io/rua-systems/servitor-cms:0.4.0 --owner Rua-Systems

The full list is in CHANGELOG.md.