SocioRelay

Help centre · Guide 35

Blog - Headless CMS

Time: 15 minutes. Works with: websites whose content comes from Contentful, Sanity, Strapi (4 or 5) or Storyblok, usually built by a developer or agency. You need: an admin of the CMS, and the names of the blog's fields.

Each CMS stores the article in your existing blog content type. Your website then shows it as usual (some sites need a rebuild: ask your developer to rebuild on publish, which most already do).

Contentful

  1. Settings > CMA tokens > Create personal access token (Content Management). Copy it.
  2. Note the Space id (Settings > General settings), the Environment (usually master) and the blog's Content type id (Content model > your blog type).
  3. In the app: Blog > Add a website > Contentful. Fill in the ids, the Locale (for example en-US or en-GB) and the field ids for title, slug, body and, if you have them, summary and image.
  4. Body field type: richtext for a Rich text field, markdown or html for a Long text field.

Sanity

  1. sanity.io/manage > your project > API > Tokens > Add API token with Editor rights. Copy it.
  2. Note the Project id and Dataset (usually production) and the document type of posts (often post).
  3. In the app: Blog > Add a website > Sanity. Fill in the details and the field names: body (often body), image (often mainImage), summary and date if your posts have them.
  4. Body format: portable (Portable Text, the usual), markdown or html.

Strapi

  1. Settings > API Tokens > Create new API token: type Custom, with create and find on your articles collection and upload on Media Library (or Full access). Copy it.
  2. Note the collection's API name (Content-Type Builder > your collection; for example articles).
  3. In the app: Blog > Add a website > Strapi. Fill in the Strapi address if it's not your website's address, the token, collection and field names (title, slug, body, and summary and image if you have them).
  4. Body format: markdown for Rich text (Markdown) fields, html for text fields shown as HTML.

Storyblok

  1. My account > Personal access tokens > Generate. Copy it.
  2. Note the Space id (Settings > Space), your Region (eu, us, ca or ap), the blog folder id and folder slug, and the content type (component) of posts.
  3. In the app: Blog > Add a website > Storyblok and fill these in, with the field names (the body field must be a Markdown or text field).

Then

Press Save, then Test connection. Write and approve a short test article (guide 10) and check it on your site. If article links come out wrong, set Article address pattern, for example {url}/news/{slug}.

These guides are also in the app: Step-by-step guides. Stuck? Email info@sociorelay.com.

← Blog - Duda · Blog - Umbraco and Craft CMS →