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
3
votes
1 answer

How to optionally query references in gatsby Contentful Rich Text?

I'm trying to create a blog page that can optionally display any image assets when they exist. First, I created a content modal in Contentful with a Rich Text named "Body", and then I created an entry with some random text in it. In Gatsby, when I…
York Wang
  • 1,909
  • 5
  • 15
  • 27
3
votes
1 answer

Gatsby build command - contentful plugin not getting spaceId & accessToken from .env file

I've been working on this for several hours and have been trying out a number of suggestions in similar questions here. I can run my gatsby site develop build just fine, but when I run "gatsby build" I'm running into this error. Invalid plugin…
user14593966
  • 151
  • 1
  • 14
3
votes
1 answer

Gatsby useStaticQuery with locale

I'm using gatsby with contentful data source and gatsby-plugin-react-int. On each page of my site present the block with latest news, so I use the useStaticQuery hook to get data for the "News" component export const useStaticNewsQuery = () =>…
3
votes
1 answer

Contentful API: How to render entry-hyperlink

I'm trying to render the Contentful Document to html, using rich-text-html-renderer. However, if the richtext contains nodes of the type entry-hyperlink, this just renders out like this: type: entry-hyperlink id:…
Thomas
  • 6,325
  • 4
  • 30
  • 65
3
votes
1 answer

GraphQL filter Contentful posts

I'm trying to fetch posts like category->post1, post2, but some category has no post. So I want to skip/filter those categories. How can I do that? Query example: query MyQuery { allContentfulCategory(limit: 10, filter: {}) { edges { …
Moni
  • 47
  • 9
3
votes
2 answers

How can I cache nested objects with Apollo Client?

I'm using the Contentful GraphQL API to fetch a collection of items, in this example football clubs. query Clubs($limit: Int!, $skip: Int!) { clubCollection(limit: $limit, skip: $skip) { total items { name …
Lingertje
  • 216
  • 3
  • 10
3
votes
0 answers

Next.js does not delete dynamic page deleted in CMS

I am using next.js 10 and have a [slug] page which creates dynamic pages from Contentful CMS. I am changing the slug inside CMS and run next dev the old slug correctly returns 404 and the new slug works. However when I build and run next start the…
jeff
  • 1,169
  • 1
  • 19
  • 44
3
votes
1 answer

Contentful with Gatsby: rendering RichText field by accessing json not possible (raw instead)

I am following a documentation on how to implement Contentful's RichText field type with Gatsby. My GraphQL query only returns a field raw on my RichText field called synopsis: query MyQuery { allContentfulCountry { edges { node { …
Steven
  • 1,218
  • 3
  • 18
  • 38
3
votes
2 answers

How to debounce rebuild triggers (e.g. Contentful and GitHub Actions)

I have a static site (Gatsby) that builts with GitHub Actions and uses data that is organized in Contentful. The content changes frequently in a row (like 10 changes within 10 minutes) and this currently results in the page being recreated multiple…
K. D.
  • 4,041
  • 9
  • 48
  • 72
3
votes
0 answers

Contentful - How to add/manage multiple fields from a Contentful App?

I want to add 3 custom fields to my content model By going the field extension route, I would have to create an app for each field that I want and that would mean host each of them separately and configure them individually with my contentful…
3
votes
1 answer

Render Contentful Reference (many) Array on Gatsby

I am pretty new to using Contentful and their Reference (many) field type. I have one reference type that pulls in many product names. in GraphQL I can see all my product name displaying, but when I try and render it on Gatsby I am not seeing…
SteveKim72
  • 31
  • 6
3
votes
2 answers

Cannot query field "x" on type "y"

I need some help with a Graphql query :). I'm trying to deploy the portfolio website to the Netlify and during deploy, I get this error. My code working on localhost but not on a Netlify. I need to pull data from the Contentful and populate image…
3
votes
2 answers

How to service a Gatsby website with multiple domains and its contents?

I built a website using Gatsby, Contentful, and deployed on Netlify. I am going to run this website with multiple domain aliases. ex: alias1.example.com alias2.example.com In that case, the aliases work well and the website have to show contents…
hotcakedev
  • 2,194
  • 1
  • 25
  • 47
3
votes
1 answer

Netlify Gatsby build error, build works locally

Yesterday and during many months everything worked fine when adding a blogpost via Contentful that triggered a build hook on Netlify. Today a new Blogg post add and build hook via Netlify does not work. When locally running gatsby develop or gatsby…
Patrik Rikama-Hinnenberg
  • 1,362
  • 1
  • 16
  • 27
3
votes
1 answer

How can I use inline images with rich text in Gatsby?

I'm trying to recreate a text with small inline images inside. Something like this: I've set a content model in Contentful with a Rich Text but the only way I can insert the images is as a block. Than in Gatsby I query the data: const data =…
mdash
  • 153
  • 2
  • 12