All Questions
Tagged with sanity headless-cms
16
questions
6
votes
2
answers
9k
views
How to make sanity io array select as multiselect?
I have a lot of tags, and I need to select a lot for each document. It is uncomfortable to click one by one every time. Also I see selected elements. How can I remake it into somefield like a ...
6
votes
2
answers
3k
views
Is there a way to get a structure of a Strapi CMS Content Type?
A content-type "Product" having the following fields:
string title
int qty
string description
double price
Is there an API endpoint to retrieve the structure or schema of the "Product&...
3
votes
1
answer
687
views
How to filter references based on change in another reference?
I have created an object with 3 reference fields - categories, subcategories, and types. I want the subcategories to show subcategories related to the selected category.
{
title: "Product ...
2
votes
1
answer
2k
views
Sanity query in an array of references
I have an array of articles with array of tags with references:
_type: "article",
tags: [
{
_id: "123",
_rev: "123",
_type: "articleTag",
key: { ...
2
votes
1
answer
1k
views
Text highlight is not being applied at front-end in Sanity CMS
I am trying to create a blog using Sanity Headless CMS and React for the frontend.
I have made a decorator for highlighting text. As you can see in the image below, in the editor, the highlighted text ...
1
vote
1
answer
2k
views
Unable to add code blocks in Sanity CMS after I install the code-input plugin
I am learning to build a blog using Sanity CMS and React. I am new to Sanity.
I should be able to insert code snippets in my blog posts. So, I have installed the code-input plugin.
According to the ...
1
vote
1
answer
528
views
How to dynamically create pages using sanity and next js?
I just watched this video on youtube, where we can see that a preview of the page is being instantly dynamically generated within the studio, while the person is adding the components randomly from ...
1
vote
0
answers
1k
views
How to make child looks like relative in sanity.io?
I have a formed structure of documents:
{
name: 'item',
title: 'item',
type: 'document',
fields: [
{
name: 'category',
type: 'reference',
title: 'category',
to: ...
0
votes
1
answer
467
views
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 ...
0
votes
1
answer
345
views
Getting issue while fetching prev/next post from Sanity CMS ( Next js +Sanity static blog)
I'm using Sanity CMS, and trying to fetch previous and next post using this query below.
const query = `*[_type=='post' && slug.current == $slug][0]{
_id,title,_updatedAt,
"...
0
votes
1
answer
252
views
Render download link sanity.io result in a blank page
I'm new diving into sanity.io and I'm trying to figure out why is displaying a blank page.
N.B. If I comment out the the JSON.stringify display everything correct, including the cvURL link.
This is ...
0
votes
2
answers
624
views
How to change field style in the sanity io user interface?
How can I change a style of a component easy? I just want limit a text-field height in a sanity user inerface.
It is uncomfortable to scroll all the text every time. Where can I write something like ...
0
votes
0
answers
8
views
can we use conditions in sanity schema
i have a schema named -'category', the other scheme is named -'Box' and the category scheme is referenced inside the 'Box' schema .
What i want is if there are 2 categories ('catg 1' and 'catg2'), and ...
0
votes
0
answers
25
views
CLI errors during Headless CMS Sanity integration with Nextjs
First, I have created a new template using npx create-next-app@latest. After that I have used the command suggested by sanity website to integrate sanity studio in my nextjs project.
That command is ...
0
votes
0
answers
68
views
Trying to setup sanity.io
Every time I use this command 'npm run dev' to open sanity studio, I get this error :
✔ Checking configuration files...
Sanity Studio using [email protected] ready in 1382ms and running at http://localhost:...
0
votes
0
answers
166
views
Adding two categories to a same product in Sanity.io
How I can assign two categories to the same product in sanity schema? like a shirt could be in Featured Category as well as Shirt category. So, all I want is to add an option so that I can attach 2 ...