Questions tagged [prismic.io]

A developer-friendly CMS backend

Home page

178 questions
0
votes
1 answer

Get all tags from document type

I'm having a Nuxt project where I use Prismic as CMS. I need to get all tags from document type. I tried with this query but I get all the tags from the API, including tags I dont need. async fetch() { this.filters = await this.$prismic.api.tags…
mart cube
  • 633
  • 1
  • 15
  • 30
0
votes
1 answer

How to make a foreach request in Apollo GraphQL?

I have a blog in javascript and I'm using Apollo GraphQL to save my data. I intend to make a list with six posts of all categories. Like this: [ technology: [ post1, post2, ... ], cook: [ post1, post2, ... ], …
Charles Braga
  • 488
  • 1
  • 4
  • 11
0
votes
1 answer

How to reduce 3 graphQL Apollo requests in only 1 request

I have a blog in JavaScript and I'm using Apollo GraphQL to save my data. I intend to get six articles of three categories. So I make a request to take all posts of one category and repeat this request three times with the categories's id's. So, I…
Charles Braga
  • 488
  • 1
  • 4
  • 11
0
votes
0 answers

Nuxt.js Prismic.io Integration Issue

Following this simple tutorial as an intro to Nuxt with a hosted headless CMS. I got to the end, put my API key into the required file, but I get the error: Cannot read property 'data' of undefined at line 21, ie: const header =…
0
votes
1 answer

Prismic Query - Query by Category

I have this product structure: And I would like to query by the uid of toys. However, this query is not working: const products = await this.$prismic.api.query([ this.$prismic.predicates.at('my.product.category','toys' )] It doesn't work…
Riza Khan
  • 2,712
  • 4
  • 18
  • 42
0
votes
0 answers

prismic sm --setup: no such file or directory when running

I'm using prismic and trying to get setup. It says to run: prismic sm --setup But I get an error that no file or directory exists. I'm using it with Next.js. Does anyone know why this is happening?
Sid
  • 846
  • 3
  • 12
  • 25
0
votes
2 answers

'Property does not exist' errors in terminal but not Chrome console - Nuxt/Prismic

I'm using Nuxt and Prismic to create a product catalogue website. I'm currently working on fetching navigation sections (product categories) from Prismic to display in a sidebar. Everything seems to be working fine (content loads and displays as…
user3746428
  • 11,047
  • 20
  • 81
  • 137
0
votes
1 answer

How do I deploy my Gatsby site to Azure when new Prismic content is published?

My current workflow sucks! It's due to inexperience with static site generators. I have a site built with Gatsby. The content is sourced from the Prismic headless CMS. I deploy to Azure Static Web Apps via command line Git. When I push or manually…
Bryan White
  • 334
  • 1
  • 13
0
votes
0 answers

Best practice for repeated react components

I'm building a Gatsby site with Prismic that, as we're getting towards the end of the dev process, is starting to have a fairly large number of components. I'm wondering, however, what the best practices are for components that are used in multiple…
Jesse Winton
  • 568
  • 10
  • 33
0
votes
1 answer

Page Templates re-rendering on every click in Prismic & Gatsby

I've been trying to diagnose why I've got useEffect running multiple times when I click a component, even with empty dependencies. I found a good way to figure out where my problem lies, using the solution in this answer. Essentially I'm…
Jesse Winton
  • 568
  • 10
  • 33
0
votes
1 answer

Checking empty query parameter in nuxt

I have a search page on my Prismic/Nuxt project that makes a full-text query to the Prismic API. This code will do that export default { name: 'Search', async asyncData({ $prismic, params, query, error }) { try { // Query to get post…
Morten Hagh
  • 2,055
  • 8
  • 34
  • 66
0
votes
1 answer

Material UI customize property behind classes

I am trying to make an application. And I want to customize the value that comes after classes.something. The something I want to be a value that comes out of my API. I made 2 custom CSS classes: new: { color: '#0099FF', }, improvement: { …
0
votes
1 answer

Nuxt: Show splash animation once per session

I'm new to Nuxt, and I would like to show a fullscreen animated gif for ~2secs to the user upon first visit to my site. I'm assuming I can use cookies to keep track of who to show the animation screen to, but I have no idea where to start. My…
Joe Bauer
  • 572
  • 1
  • 9
  • 22
0
votes
2 answers

Nuxt handle fetch errors from Prismic API

I'm building a blog with Nuxt to and Prismic as CMS. my nuxt.config.js looks like this: mode: 'universal', modules: ['@nuxtjs/prismic'], target: 'static', generate: { fallback: '404.html', }, Project is deployed on Netlify with build command…
mart cube
  • 633
  • 1
  • 15
  • 30
0
votes
1 answer

Why don't static queries work in Storybook?

Description I'm getting "Loading (StaticQuery)" in Storybook for any component that uses StaticQuery and "The result of this StaticQuery could not be fetched." in Storybook for any component that uses useStaticQuery. Everything seems to work fine…
mrseanbaines
  • 823
  • 2
  • 12
  • 25