Publishing categories: sort a group's posts into a tree
Describes Publishing 0.19.0.
Categories sort a group’s posts by topic, such as “Releases” or “Guides”. Each group has its own categories, and they can be nested: a category can have subcategories. Readers can browse a category’s posts on its archive page.
Where to find it
Open a group under Publishing in the admin sidebar and click Categories at the top of its post list. The address is /admin/publishing/categories/<group>, for example /admin/publishing/categories/news. You need the Publishing permission.
A group's categories.
The category table
The table lists the group’s categories as a tree: each category is followed by its subcategories, indented. A category with subcategories has a folder icon, the others a tag icon. The columns:
- Name and Slug: the slug is the category’s part of its archive address.
- Posts: how many published posts are filed under the category. A post counts when its live version is filed there, so refiling a draft doesn’t change the count until the draft is published.
With no categories yet, the page says No categories yet — create the first one.
New category opens the form for a top-level category.
Creating or editing a category
A new category with its colour and icon.
- Name: required, up to 255 characters.
- Slug: left empty, it is made from the name (“auto from the name”). Only lowercase letters, numbers and hyphens, and unique within the group (two groups can each have a “news” category). A slug that is taken says “That slug is already used in this group.”
- Parent: the category it sits under, or None (top level).
- Position: a number for the order among its siblings.
- Description: optional, up to 1024 characters.
- Colour: a hex value such as
#4f46e5, or a theme colour:primary,secondary,accent,neutral,info,success,warningorerror(the field suggests them). - Icon: a Heroicons name such as
hero-cube. The field suggests a set of icons and shows the chosen one under it. An icon outside that set says “Not in the suggested set: shows only if the site’s CSS includes it.” - SEO title (up to 120 characters) and SEO description (up to 320 characters): the title and meta description of the category’s archive page.
The colour and icon are shown on the category’s chips on the public pages, when the group shows them (see the guide on the group’s public pages). A colour, icon or SEO text that isn’t valid is explained under its field, for example “Use a Heroicons name such as hero-cube.” Leaving one of these four fields empty removes it.
Create (or Save) saves the category; Cancel closes the form.
The row menu
The ⋮ button on each row offers:
- Edit: opens the form with the category’s values.
- New subcategory: opens the form with this category as the parent.
- Move to…: picks a New parent in a tree, or the top level. A category can’t be moved under itself or one of its own subcategories.
- Delete: asks “Delete “…”? Its subcategories move to the top level and posts lose this category.” After deleting, the page says Category deleted — its children moved to the top level.
Reordering
Drag a row by its handle (Drag to reorder (among siblings)) to change its place among the categories that share its parent. Dragging can’t change a parent: when a drop changes nothing, the page says to use Move to…. A category with no siblings has no handle.
Filing posts
A post is filed under categories in the editor, for each version: see the guide on writing a post. Filing applies to the version you edit, and readers see the filing of the live version.
The archive page
Each category has a public archive page at /<group>/category/<slug>, with the language in front on a multilingual site (for example /en/news/category/releases). It lists the group’s published posts filed under the category or any of its subcategories. Its page title is the category’s SEO title when set, and its description the SEO description. The archive has its own feed at the same address followed by /feed.xml. See the guide on the public pages.
What it doesn’t do
- Category names are edited in one language here; the form has no fields for translated names.
- Deleting a category can’t be undone. The posts filed under it are not moved to its parent: they lose the category.
- Categories belong to one group: they can’t be shared between groups, and a parent must be in the same group.