Questions tagged [sanity]

Sanity is a structured content platform and API that also offers an open source, React-based Studio that functions as like a headless CMS on top of the Sanity APIs.

Sanity treats content as structured data and makes it easily available over an API. The collaborative editor, called the Content Studio, is a fully customizable, client-side web application. Documentation here.

833 questions
0
votes
1 answer

Is there a way to translate Sanity Studio?

I'm trying to use Sanity for the first times, as it looked a good headless CMS approach. But I didn't find any ways to change the interface language. Does anyone know how to do that?
rdrgtec
  • 592
  • 10
  • 26
0
votes
1 answer

Unsupported style property with React-Awesome-Slider and Gatsby

I've added React Awesomeslider into my project, which is built with Gatsby.js, Next.js and using Sanity.io as a CMS. The css is currently configured by post css. https://github.com/rcaferati/react-awesome-slider I've linked the plain css as advised…
LAT89
  • 161
  • 3
  • 15
0
votes
2 answers

Use (nested) prop value to reference another prop

I'm attempting to consume a nested prop value, then use that value to dynamically fetch another prop. This works for shallow (first level) props, but it fails when the prop is nested. function DynamicContent(props) { const content =…
bzmills
  • 19
  • 7
0
votes
1 answer

React async data fetch does not fetch data on static build

I'm building a static site using Sanity.io and Gatsby.js. The data is hosted through Sanity and I'm fetching it via GROQ. Host and build is on Netlify. The problem is that when I build I only get a rendered result of Loading. It does work in…
Tim
  • 861
  • 1
  • 12
  • 27
0
votes
1 answer

Sanity and NextJS, Posts not displaying on index.js

I followed the tutorial, and got to the last section where you put the blog posts on a page and the page ends up with just an H1 tag and none of the posts, is anyone able to take a look at the code and tell me why it might not be working? import…
Mac Dev
  • 83
  • 1
  • 3
  • 11
0
votes
1 answer

Can i merge/combine graphql API arrays into one?

Hey i'm using Sanity and have created both a allSanityPost (for my blog posts) and allSanityCases (for all my cases). Do anyone know how to combine these categories into one array and order them by their "published-date"? I want to display them both…
0
votes
0 answers

Internal Server Error - An internal server error occurred // SANITY // GATSBY

community - can anyone tell me, why i'm getting this error message every time i try to deploy my sanity graphQl? (See image and code snippet). u: Internal Server Error - An internal server error occurred at onResponse…
0
votes
2 answers

How to return a variable in jsx and react into a react component

I am at the very beginning of creating an icon picker for sanity.io with react icons npm package. I am stuck on trying to map over an object and returning the right code for react to work using Object.values(ReactIcons).map... if I just console log…
Anders Kitson
  • 1,413
  • 6
  • 38
  • 98
0
votes
1 answer

Can't find proper path for sanity.io default rich-date component

I want to use default sanity rich-date plugin in my custom input, but I can’t find the proper import path. I tried: import DateInput from 'part:@sanity/form-builder/input/rich-date' and it’s not working. Does anybody knows the right path?
0
votes
1 answer

Receive webhook or other kind of ping from Sanity when a document is published?

I have a backend that stores data in Sanity.io, and I would like to configure Sanity to ping my app when a document is published, so that I can clear any cached data. This way I can greatly reduce traffic between my app and Sanity. Possible?
Christian Johansen
  • 1,861
  • 1
  • 16
  • 22
0
votes
2 answers

How do i fix "npm does not support Node.js v12.14.1" when they came from the same LTS download?

Truthfully this has never happened with me on any development environment My node version: 12.14.1 My npm version: 6.13.4 I was building a Gatsby Site using Sanity.io as a CRM and Im getting this error: ahinds$ npm run dev >…
Avery-Dante Hinds
  • 509
  • 1
  • 5
  • 17
0
votes
1 answer

How to use Sanity's assets HTTPS API and send a filename through the query?

I am using axios for the request module. I just want to be able to specify the filename of the image and can't figure out how to do this with this endpoint: const { data } = await axios({ method: `post`, url:…
Taylor Austin
  • 5,407
  • 15
  • 58
  • 103
0
votes
1 answer

Gatsby.js - Export sanity.io data ( And maybe to netlify-cms in markdown files)

The goal I want to migrate (maybe convert) the pages data from the old site to the new site. The outline I'm going to do a rebrand on an existing Gatsby website for a client. The client has provided me with the source files for Sanity-Studio &…
Tim
  • 861
  • 1
  • 12
  • 27
0
votes
1 answer

Resolved: Sanity.io Deploy fails even though local host says query exists

I have been building a website with Sanity.io (Netlify) It is working perfectly fine when I'm using localhost. However, when I deploy the site to Netlify, graphql query reverts back to the beginning list. Here is the image of the localhost…
Bora ALAP
  • 269
  • 3
  • 13
0
votes
2 answers

In a GROQ query can you get each asset's data in an array of image references?

I have an array of images in my schema, a gallery. I want to return the image urls for each of the images in the array with my GROQ query. If I do image{asset->} it works, for a single image. For an example of the actual query, I'm trying to…
Brian B.
  • 1
  • 1
  • 1