Sign up for a free Contentful account with GitHub.
Add gem "contentful"
to Gemfile.
require 'dotenv/load'
client = Contentful::Client.new(
space: ENV["CONTENTFUL_SPACE_ID"],
access_token: ENV["CONTENTFUL_ACCESS_TOKEN"],
dynamic_entries: :auto
)
contentful_bootstrap create_space andrewmcodes --template blog
Install cloudinary and graphql playground
query {
accountCollection {
items {
sys {
id
publishedAt
firstPublishedAt
publishedVersion
}
title
url
username
image {
title
url
}
}
}
}
query {
pageCollection {
items {
title
description
content
sys {
id
publishedAt
publishedVersion
firstPublishedAt
}
}
}
}