Contentful is a Headless Content Management System (CMS) – an API-first content management platform to create, manage and publish content on any digital channel.
A headless CMS is a content management system that separates the presentation layer (where content is presented) from the backend (where content is managed). A headless CMS allows you to manage content in one place and be able to deploy that content on any digital channel you choose.
- Headless CMS explained in 1 minute (Contentful)
Testing
Headless CMS usually are hosted in the cloud. The backend is made of micro-services. Use the same tests as for Cloud and API tests.
Contentful CLI
Installation on Kali Linux
- Installing the Contentful CLI (Contentful)
#sudo apt install npm
sudo npm install -g contentful-cli
Help
contentful -h
Usage: contentful <cmd> [args]
Commands:
config Manage and list your configs
content-type Manage and list your space content types [aliases: ct]
extension Manage and list your extensions
init Get started with Contentful
login Login to Contentful
logout Logout from Contentful
merge A CLI version of the Merge app
organization Manage and list your organizations
space Manage and list your spaces
Options:
-h, --help Show help [boolean]
-v, --version Show current version [boolean]
Config file
~/.contentfulrc.json
{
"managementToken": "...",
"activeSpaceId": "abcabcabcabc",
"activeEnvironmentId": "dev",
"host": "api.contentful.com"
}
List config
contentful config list
Login
Will use the config file.
contentful login
List spaces
contentful space list
GraphQL
- GraphQL Content API (Contentful)
See GraphQL Cheat Sheet.