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'
5
5
import subsection from './subsection'
6
6
import external_link from './external_link'
7
7
import shortcut from './shortcut'
8
+ import code_highlight from './code_highlight'
8
9
9
10
export default createSchema ( {
10
11
name : 'cheatsheetSchema' ,
11
12
types : schemaTypes . concat ( [
12
13
section ,
13
14
subsection ,
14
15
external_link ,
15
- shortcut
16
+ shortcut ,
17
+ code_highlight
16
18
] )
17
19
} )
Original file line number Diff line number Diff line change @@ -8,11 +8,27 @@ export default {
8
8
name : 'name' ,
9
9
type : 'string'
10
10
} ,
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
+ } ,
11
27
{
12
28
title : 'Description' ,
13
29
name : 'description' ,
14
30
type : 'text' ,
15
- rows : 4
31
+ rows : 7
16
32
} ,
17
33
{
18
34
title : 'Code' ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import DescriptiveItem from './DescriptiveItem'
8
8
// `
9
9
10
10
export default function TopicSection ( props ) {
11
- // console.log('TS props: ', props);
11
+ console . log ( 'TS props: ' , props ) ;
12
12
return (
13
13
< section
14
14
id = { props . section . anchor_id }
Original file line number Diff line number Diff line change @@ -155,13 +155,6 @@ export const query = graphql`
155
155
_type
156
156
name
157
157
description
158
- list_order
159
- external_links {
160
- _id
161
- _type
162
- description
163
- url
164
- }
165
158
subsections {
166
159
... on SanityGeneralSubsection {
167
160
_id
@@ -176,11 +169,7 @@ export const query = graphql`
176
169
description
177
170
url
178
171
}
179
- code {
180
- _type
181
- code
182
- language
183
- }
172
+ _rawDescriptionBlock(resolveReferences: {maxDepth: 10})
184
173
}
185
174
... on SanityShortcutSubsection {
186
175
id
@@ -192,8 +181,17 @@ export const query = graphql`
192
181
notes
193
182
}
194
183
}
184
+ list_order
195
185
}
196
186
}
197
187
}
188
+ # allSanityGeneralSubsection {
189
+ # edges {
190
+ # node {
191
+ # id
192
+ # _rawDescriptionBlock
193
+ # }
194
+ # }
195
+ # }
198
196
}
199
197
`
You can’t perform that action at this time.
0 commit comments