File tree Expand file tree Collapse file tree 5 files changed +43
-15
lines changed Expand file tree Collapse file tree 5 files changed +43
-15
lines changed Original file line number Diff line number Diff line change 1+ export default {
2+ title : 'Code Highlight' ,
3+ name : 'code_highlight' ,
4+ type : 'object' ,
5+ fields : [
6+ {
7+ title : 'Inline Code Highlight' ,
8+ name : 'inline_code_highlight' ,
9+ type : 'text'
10+ }
11+ ]
12+ }
Original file line number Diff line number Diff line change @@ -5,13 +5,15 @@ import section from './section'
55import subsection from './subsection'
66import external_link from './external_link'
77import shortcut from './shortcut'
8+ import code_highlight from './code_highlight'
89
910export default createSchema ( {
1011 name : 'cheatsheetSchema' ,
1112 types : schemaTypes . concat ( [
1213 section ,
1314 subsection ,
1415 external_link ,
15- shortcut
16+ shortcut ,
17+ code_highlight
1618 ] )
1719} )
Original file line number Diff line number Diff line change @@ -8,11 +8,27 @@ export default {
88 name : 'name' ,
99 type : 'string'
1010 } ,
11+ {
12+ title : 'Description Block' ,
13+ name : 'description_block' ,
14+ type : 'array' ,
15+ of : [
16+ {
17+ type : 'block' ,
18+ of : [
19+ {
20+ type : 'code_highlight'
21+ } ,
22+ ]
23+ }
24+ ] ,
25+ rows : 7
26+ } ,
1127 {
1228 title : 'Description' ,
1329 name : 'description' ,
1430 type : 'text' ,
15- rows : 4
31+ rows : 7
1632 } ,
1733 {
1834 title : 'Code' ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import DescriptiveItem from './DescriptiveItem'
88// `
99
1010export default function TopicSection ( props ) {
11- // console.log('TS props: ', props);
11+ console . log ( 'TS props: ' , props ) ;
1212 return (
1313 < section
1414 id = { props . section . anchor_id }
Original file line number Diff line number Diff line change @@ -155,13 +155,6 @@ export const query = graphql`
155155 _type
156156 name
157157 description
158- list_order
159- external_links {
160- _id
161- _type
162- description
163- url
164- }
165158 subsections {
166159 ... on SanityGeneralSubsection {
167160 _id
@@ -176,11 +169,7 @@ export const query = graphql`
176169 description
177170 url
178171 }
179- code {
180- _type
181- code
182- language
183- }
172+ _rawDescriptionBlock(resolveReferences: {maxDepth: 10})
184173 }
185174 ... on SanityShortcutSubsection {
186175 id
@@ -192,8 +181,17 @@ export const query = graphql`
192181 notes
193182 }
194183 }
184+ list_order
195185 }
196186 }
197187 }
188+ # allSanityGeneralSubsection {
189+ # edges {
190+ # node {
191+ # id
192+ # _rawDescriptionBlock
193+ # }
194+ # }
195+ # }
198196 }
199197`
You can’t perform that action at this time.
0 commit comments