Follows these simple steps to quickly get started using LexasCMS
Before you can start, you’ll need an account. You can request a free trial here.
After creating your account and logging in, click the large “Create Organisation” button to create yourself a new organisation.
Open your new organisation and go to the spaces section, from here you can click the large “Create Space” button to create a new space.
Open the space that you just created, and click the “Content Model” link on the left sidebar and click the “Switch to YAML Editor” button. Overwrite the contentTypes
key in the YAML with the below configuration, and then save your changes.
contentTypes:
- id: "article"
name: "Article"
fields:
- id: "title"
name: "Title"
config: { type: "text" }
- id: "body"
name: "Body"
config: { type: "markdown" }
Now that we have a space with a defined content model, we need to add some content.
Click the ‘Content’ link on the left sidebar, and then create a new content item by clicking on the ‘Create Item’ button. Enter a name for your new content item and select ‘Article’ as the content type.
At this point we now have a content item, but we still need to enter our actual content. This is done by creating one or more variations, each of which can have different content and be independently scheduled and prioritised.
Open your new content item, and create a new variation by clicking on the ‘Create Variation’ button. Enter a name for your variation and click on the “Create Variation” button to create it.
You’ll now be taken to the content editing screen where you can input the content for this particular variation. Once you’ve finished adding content to your article, make sure that you’ve published the variation and click the ‘Save Changes’ button.
Awesome! You’ve created a new space, defined its content model and added some content. All that’s left now is to query the API!
Using any GraphQL compatible client (such as GraphiQL, Insomnia or Postman), execute the below query against your spaces GraphQL delivery API endpoint. This will retrieve the new article that you just created.
query {
articleCollection {
items {
id
title
body
}
}
}
© 2022 Status200 Ltd.