Questions tagged [contentful]

Contentful is a cloud based CMS framework using a RESTful JSON API.

Provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike many other content management systems, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management, and delivery APIs, and a customizable web app that enables developers and content creators to ship digital products faster.

859 questions
2
votes
1 answer

How to query data from 2 APIs

I have setup a Gatsby Client which connects to Contentful using the gatsby-source-contentful plugin. I have also connected a simple custom API which is connected using the gatsby-source-graphql plugin. When I run the dev-server I am able to query…
Raphael
  • 265
  • 4
  • 11
2
votes
0 answers

How do I handle undefined values in Gatsby graphql?

I am using Contentful and Gatsby on my current project. I keep getting this error when I try and run my queries: TypeError: Could not find field type. This happens on this rich text field if it is empty on Contentful's side. I do not have this…
Danny
  • 77
  • 1
  • 8
2
votes
2 answers

Question about Gatsby, Contentful, Gitlab and S3

How do I make gatsby in gitlab watch for changes in contentful then gitlab will automatically deploy it to S3? help I'm a beginner.
2
votes
1 answer

How to get html only from returned object vuejs

I have a vue project that needs to return data from a rich text field in Contentful. The data is returned as an object, is there a way to render this data using the v-html directive? At present I am able to render the html however it's wrapped in…
Shawn
  • 219
  • 2
  • 10
2
votes
2 answers

Sorting GraphQL query on multiple queries in Gatsby

I'm using Gatsby as my static generator and Contentful as my datasource. We've got multiple contentTypes in Contentful (blog, event, whitepaper) and I want to return these in within one query and sorted by createdAt date. So far I have the following…
Tom Maton
  • 1,564
  • 3
  • 23
  • 41
2
votes
2 answers

NextJS + Contentful => getEntries request within getInitialProps breaks production build

Stack: NextJS, Contentful + Now Overview: Invoked contentful's getEntries() request within getInitialProps async function. In local environment, everything is working perfectly, I receive the posts then successfully pass them as props to the page…
Tyler Knapp
  • 93
  • 1
  • 9
2
votes
1 answer

Gatsby pageContext empty in GraphQL

I'm building a dynamic Gatsby site with multiple languages through Contentful. I pass the page's ID in the pageContext object in my gatsby-node.js to fetch the necessary content on each page, but on the root URL / the data inside my pageContext…
dnlmzw
  • 751
  • 1
  • 8
  • 20
2
votes
2 answers

Gatsby + Contentful + Netlify - how to render tracedSVG images in production?

I am building a website using Gatbsy, Contentful CMS and Netlify. It looks great and works locally but I have a problem in production regarding fluid images using the tracedSVG option. The Netlify deploy used to work on occasions and as I added more…
GBouffard
  • 1,125
  • 4
  • 11
  • 24
2
votes
0 answers

Switching contentTypeId while fetching data from Contentful

I'm trying to display some FAQs content in my app using contentful, below is my UserFAQs.swift class which I'm using to fetch the data and this works fine. Now I have a new requirement for adding FAQs for guest user. Only the data is different per…
Francis F
  • 3,157
  • 3
  • 41
  • 79
2
votes
3 answers

Mapping data from contentful

I've been following a tutorial series and I'm trying to extrapolate on what I've done thus far. I have queried contentful to return the product details for which one of the data types is an array of productFeatures. I've tried to map this to a list…
2
votes
0 answers

Adding a const to a class component to show data from Contentful CMS in a Gatsby site

I am attaching a link to an image showing query in GraphQLI have a problem starting to show content from Contentful in my Gatsby site. I have established what query will access a simple text field data. I am confused how to add this data to a class…
Marcin
  • 41
  • 6
2
votes
1 answer

render function or template not defined in component: pages/index.vue

render function or template not defined in component: pages/index.vue I'm unsure of what this error is trying to tell me, I tried to follow the stack and couldn't make a clear determination as to what the problem is. While following the Contentful…
Joe Howard
  • 307
  • 5
  • 27
2
votes
2 answers

Contentful error when using client.fetchArray

I'm getting the following error when trying to follow this tutorial: Oh no something went wrong: A response for the QueryOn did return successfully, but a serious error occurred when decoding the array of Thing. Double check that you are…
Wazza
  • 1,725
  • 2
  • 17
  • 49
2
votes
3 answers

Convert Markdown to HTML from within a Rich-Text Component with Gatsby

I am using Contentful's Rich-Text Field type to build pages, one of the Embedded_Blocks I have is for a Markdown field type which I am using to build a table: Markdown Field Type: | Title | Title | | ---------- | ---------- | | Cell | Cell | I…
Daimz
  • 3,243
  • 14
  • 49
  • 76
2
votes
0 answers

npm install gatsby fails in WSL for contentful example

I am trying to get this git repo to run on my windows machin using WSL.... git clone https://github.com/contentful/starter-gatsby-blog.git Running npm install gives me the following errors which seem to be on trying to install gatsby-plugin-sharp.…
Justin
  • 866
  • 1
  • 13
  • 29