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
0 answers

Query Gatsby Image Data from contentful from the client

spent some hours combing the web for an answer and beginning to sense this is not possible. I am using the new gatsby-plugin-image with a V3 gatsby site with no issues using getImageData() in my build time queries (via import {graphql} from…
2
votes
1 answer

How do I loop different sections inside a contentful landing page with php

Using the php SDK, I would like to get all the content for a landing page, this will include sections with different content types / components with different fields per entry. eg. Section 1 - hero Section 2 - article Section 3 - image Q. How do I…
Jeff
  • 947
  • 2
  • 9
  • 23
2
votes
1 answer

Can I use 'useSWR' with the contentful-client to create pagination?

I'm trying to create pagination with nextjs and the useSWR hook. This is how I've currently done it, and it appears to be working... however I read in the docs that the key passed as the first parameter should be a unique string (usually a URL). I'm…
fruxo
  • 405
  • 1
  • 4
  • 8
2
votes
0 answers

How to get Gatsby Plugin Contentful Optional Fields working?

Having an optional field on a content type in Contentful, I tried to get Gatsby-Plugin-Contentful-Optional-Fields working. The optional field is an image, that I render with the new Gatsby-Image-Plugin. After configuring the plugin in my…
Peter
  • 21
  • 3
2
votes
1 answer

How can I get posts by year/month with nextjs and contentful?

I'm creating a blog with Next.js using Contentful CMS. My folder structure looks like this right now pages/blog/[year]/[month]/[slug].js The year and month folder each has its own index.js Right now I'm working on the year part it, this is how I…
fruxo
  • 405
  • 1
  • 4
  • 8
2
votes
1 answer

Angular + Jasmine: How to ignore/ mock one function in the tested component (not in a dependency)?

I know how to mock a function from a dependency, but now I have one function that is not in a dependency, it's in the actual component that I want to test. How can I tell jasmine to simply ignore it? When I run ng test this test fails: The reason…
bwx--2
  • 181
  • 2
  • 11
2
votes
0 answers

Unable to reduce build size in a Next JS Static Pages Project with some custom locale requirements

I am working on a Next JS project with Contentful CMS building multiple blogs using common react components. In Next JS I have pages hierarchy as : pages -> [domain] -> [locale] -> [slug.tsx] Basically I have 3 arrays , 1 for list of supported…
Abby
  • 51
  • 4
2
votes
1 answer

There's not a page yet at /second%20post

I have an issue regarding my gatsby site. I am fetching content from contentful and according to the code in my gatsby-node.js it has to generate two pages and it does but only one of them is working when I click on it for the second one it show…
2
votes
1 answer

"About the "code" tag in the RichText field of "Contentful dotnet SDK

RichText in Contentful is deserialized to Document type, and Document is converted to MarkupString type for use. (I created an extension method). When using the "code" tag in Contentful's RichTextEditor, the "pre" tag does not exist in the parent…
Ethree 8ch
  • 63
  • 4
2
votes
0 answers

ReferenceError: regeneratorRuntime is not defined working on vanilla js

const client = contentful.createClient({ space: "some random generated id", accessToken: "some random generated token" }); const getProducts = async() => { let contentful = await client.getEntries() …
2
votes
2 answers

Contentful SDK, React functional components, typescript and react-quill - unable to access quill history?

I am trying to change the undo/redo behaviour of react-quill when implemented as a Field modification to Contentful's SDK. The implementation is described by the template at…
Rob R
  • 31
  • 3
2
votes
1 answer

What is gatsbyContentfulFluid?

I'm learning Gatsby and GraphQL as a newbie and following this article https://ibaslogic.com/gatsby-with-contentful-cms/ It has this code: export const query = graphql` query($slug: String!) { contentfulBlogPost(slug: { eq: $slug }) { …
2
votes
2 answers

"x-robots-tag: none" on Gatsby site hosted by Gatsby Cloud with Contentful

I created Gatsby.js website hosted by Gatsby Cloud(Individual Trial Plan) and using Contentful. Although I didn't set Robot.txt, the production site automatically had x-robots-tag: none at HTTP header. This caused Google Search Console to show error…
d.y
  • 105
  • 1
  • 6
2
votes
0 answers

How to write a graphql fragment for contenful generic RichText

contentful automatically creates a schema based on the content of the backend. So if I have two entries A and B with both a richtext field it will create something like this: type A { text: AText } type B { text: BText } type AText { json:…
errnesto
  • 822
  • 5
  • 15
2
votes
1 answer

ERROR #98124 WEBPACK when running `gatsby develop`

Everything started after installing gatsby-source-contentful: ^2.3.42 => 2.3.43. ERROR #98124 WEBPACK Generating development JavaScript bundle failed Can't resolve 'history' in /Users/labanino/development/my-app/node_modules/gatsby-link If you're…
Labanino
  • 3,902
  • 9
  • 33
  • 51