File tree 3 files changed +31
-0
lines changed
3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,29 @@ export default defineConfig({
224
224
validation : ( rule ) => rule . required ( ) ,
225
225
} ,
226
226
] ,
227
+ } ,
228
+ {
229
+ type : 'object' ,
230
+ title : 'Horizontal Rule' ,
231
+ name : 'horizontalRule' ,
232
+ description : 'Horizontal rule' ,
233
+ fields : [
234
+ // NOTE: We don't generally need a field for this component.
235
+ // However, there are two reasons to actually have a field.
236
+ // (1) All Sanity schema types seem to require fields. (2) It
237
+ // is useful to have a field called “title” which shows this
238
+ // component's title in the article preview. So we create a
239
+ // dummy “title” field that always has the same title.
240
+ {
241
+ type : 'string' ,
242
+ name : 'title' ,
243
+ title : 'Horizontal rule dummy title' ,
244
+ hidden : true ,
245
+ } ,
246
+ ] ,
247
+ initialValue : {
248
+ title : 'Horizontal rule' ,
249
+ } ,
227
250
}
228
251
] ,
229
252
validation : ( rule ) => rule . required ( ) ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import Block from '../../portableTextComponents/Block.astro';
17
17
import CaptionedImage from ' ../../portableTextComponents/CaptionedImage.astro' ;
18
18
import YoutubeEmbed from ' ../../portableTextComponents/YoutubeEmbed.astro' ;
19
19
import VideoEmbed from ' ../../portableTextComponents/VideoEmbed.astro' ;
20
+ import HorizontalRule from ' ../../portableTextComponents/HorizontalRule.astro' ;
20
21
21
22
const ARTICLE_QUERY = ` *[_type == "article" && slug.current == $slug][0]{
22
23
_id,
@@ -48,6 +49,7 @@ const components = {
48
49
captionedImage: CaptionedImage ,
49
50
youtubeEmbed: YoutubeEmbed ,
50
51
videoEmbed: VideoEmbed ,
52
+ horizontalRule: HorizontalRule ,
51
53
},
52
54
block: Block ,
53
55
};
Original file line number Diff line number Diff line change
1
+ ---
2
+ // © 2025 Functional Software, Inc. dba Sentry
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ ---
5
+
6
+ <hr >
You can’t perform that action at this time.
0 commit comments