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.
813
questions
-1
votes
2
answers
480
views
How can I avoid prop drilling with a headless CMS? The context API I think hurts SEO
I want to use a headless CMO in my NextJs app (e.g. Sanity.io).
The content is especially important for SEO.
If I see it correctly, I can only receive the data on page-level via getStaticProps server-...
-1
votes
1
answer
364
views
Can't fetch item from current slug content- Sanity/Next.js
I'm trying to get the set_name from the set schema that is associated to the current slug. *[_type == 'set']{set_name, slug} is how the schema looks. I'm not getting the set_name when I click on the ...
-1
votes
1
answer
361
views
How to get all the params values in getStaticProps [duplicate]
I am trying to figure out a way to map both slugs and paths in order to get all their values in the params :
This is my code :
export async function getStaticPaths() {
const slugs = await client....
-1
votes
1
answer
81
views
How to display element from an array
In the below image there is an array given to me on doing console.log
Array on doing console.log
The name of the array is commentData
if i do commentData.name i get the name
but when i do commentData....
-1
votes
1
answer
689
views
how to arrange blog posts by categories in next-sanity
how to arrange blog post by categories in next-sanity.
click to view what I meant to arrange
All of my blogs in one line like
category 1
category 1 blog, category 2 blog, category 3 blog
i want them ...
-1
votes
1
answer
610
views
what i give project output path
I run this command
"npm install -g @sanity/cli && sanity init --template getting-started-pets --project abgfpdhd --dataset production --provider google"
changed 1 package, and ...
-1
votes
0
answers
494
views
React Native and Sanity Fetch Request Problems/Mistake?
I am trying to fetch data from a Sanity Database HTML link but eveything i try it does not work...
I am trying not to use the sanity client but just the link itself (Http:....)
import React, { ...
-1
votes
1
answer
242
views
npm install -g @sanity/cli npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Program Files\Git\usr\local npm ERR! errno -4048
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\Git\usr\local
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Git\usr\local'
npm ...
-1
votes
2
answers
55
views
how to create code for sanity testing auto screen capture?
Fast screenshot
How to easily take screenshot of my screen in windows 10?
I would like to have option to select a part of my screen to take the screenshot.
-1
votes
1
answer
127
views
I'm using Sanity for managing the database but I'm having a problem with displaying items on my website... here is the code
Why items are not displayed on my website? what did I do wrong guys?
Can anyone help me or show me how to solve the issue in this block of code(index.js)
import { client } from '../lib/client';
import ...
-2
votes
1
answer
426
views
Unhandled - error Encountered an unhandled error in this Studio. Error When I started the Sanity Start. I got this error [closed]
TypeError: Cannot read properties of null (reading 'jsonType')
at validateNonObjectFieldsProp (/static/js/app.bundle.js:170029:16)
at _default (/static/js/app.bundle.js:169997:155)
at visitors.reduce....
-5
votes
1
answer
8k
views
How to fetch data from Sanity to React?
I have trouble understanding on how to fetch my data from sanity. I have read the documentation but still i'm confused.
I tried just logging the data to the console but it gives me an error like, "No ...