Skip to content

Content types

A content type is a kind of document. It decides how documents of that kind are addressed and what they may contain.

Anatomy

PropertyWhat it is
API idThe identifier used in the API and by developers: page, article, legal. Lower case, no spaces, and hard to change later.
LabelWhat editors see in the console.
KindHow the document is addressed and rendered.
Has blocksWhether documents are built from sections.
Allowed blocksWhich block types may be used, when it has blocks.
FieldsFields on the document itself, beyond its blocks.

Kinds

KindAddressed byRenders at
pagea route, like /aboutits own URL
documenta routeits own URL
partiala key, like navinside other documents
redirecta routenothing; it sends visitors elsewhere

page and document behave identically; use document for things that are not really pages of the site's navigation, such as articles.

partial is for pieces included by other documents. A partial has no URL and cannot be visited. Its key is how documents refer to it.

redirect documents hold a destination and whether the redirect is permanent. See Redirects.

Allowed blocks

The most useful thing a content type does is limit which sections may be used.

An article that offers a pricing table will eventually contain one. Restricting the list keeps documents consistent without anyone policing it, and it makes the "add a block" catalogue short enough to read.

Add block types deliberately rather than allowing everything.

Document fields

A content type can declare fields on the document itself, for things that are not part of any section: an article's author and publication date, a legal notice's effective date.

These appear in page settings rather than on a block.

Choosing an API id

The API id ends up in code, in URLs and in your site's registry. Changing it later means changing every document of that type and every place the site refers to it.

Use a singular noun: article, not articles or blog-post-type.

A Nubisco product. Not open source.