UNPKG

21.7 kBMarkdownView Raw
1# MDAST Schema
2
3```txt
4https://ns.adobe.com/helix/pipeline/mdast#/properties/mdast
5```
6
7A node in the Markdown AST
8
9
10| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
11| :------------------ | ---------- | ------ | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------- |
12| Can be instantiated | No | Stable | No | Forbidden | Forbidden | none | [content.schema.json\*](content.schema.json "open original schema") |
13
14## mdast Type
15
16`object` ([MDAST](content-properties-mdast.md))
17
18# MDAST Properties
19
20| Property | Type | Required | Nullable | Defined by |
21| :------------------------------ | ------------- | -------- | -------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
22| [type](#type) | Not specified | Optional | cannot be null | [MDAST](mdast-properties-type.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/type") |
23| [children](#children) | `array` | Optional | cannot be null | [MDAST](mdast-properties-children.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/children") |
24| [position](#position) | `object` | Optional | cannot be null | [MDAST](section-definitions-section-properties-position.md "https://ns.adobe.com/helix/pipeline/position#/properties/position") |
25| [value](#value) | `string` | Optional | cannot be null | [MDAST](mdast-properties-value.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/value") |
26| [payload](#payload) | `object` | Optional | cannot be null | [MDAST](mdast-properties-payload.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/payload") |
27| [depth](#depth) | `integer` | Optional | cannot be null | [MDAST](mdast-properties-depth.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/depth") |
28| [ordered](#ordered) | `boolean` | Optional | cannot be null | [MDAST](mdast-properties-ordered.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/ordered") |
29| [start](#start) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-start.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/start") |
30| [spread](#spread) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-spread.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/spread") |
31| [checked](#checked) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-checked.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/checked") |
32| [align](#align) | `array` | Optional | cannot be null | [MDAST](mdast-properties-align.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/align") |
33| [lang](#lang) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-lang.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/lang") |
34| [identifier](#identifier) | `string` | Optional | cannot be null | [MDAST](mdast-properties-identifier.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/identifier") |
35| [label](#label) | `string` | Optional | cannot be null | [MDAST](mdast-properties-label.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/label") |
36| [url](#url) | `string` | Optional | cannot be null | [MDAST](mdast-properties-url.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/url") |
37| [meta](#meta) | Unknown Type | Optional | can be null | [MDAST](meta-definitions-meta.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/meta") |
38| [title](#title) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-title.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/title") |
39| [code](#code) | `string` | Optional | cannot be null | [MDAST](mdast-properties-code.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/code") |
40| [intro](#intro) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-intro.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/intro") |
41| [image](#image) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-image.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/image") |
42| [types](#types) | `array` | Optional | cannot be null | [MDAST](mdast-properties-types.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/types") |
43| [alt](#alt) | Unknown Type | Optional | can be null | [MDAST](mdast-properties-alt.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/alt") |
44| [referenceType](#referenceType) | Not specified | Optional | cannot be null | [MDAST](mdast-properties-referencetype.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/referenceType") |
45| [data](#data) | `object` | Optional | cannot be null | [MDAST](mdast-properties-data.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/data") |
46
47## type
48
49The node type of the MDAST node
50
51
52`type`
53
54- is optional
55- Type: unknown
56- cannot be null
57- defined in: [MDAST](mdast-properties-type.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/type")
58
59### type Type
60
61unknown
62
63### type Constraints
64
65**enum**: the value of this property must be equal to one of the following values:
66
67| Value | Explanation |
68| :--------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
69| `"root"` | The root node, representing a document or section |
70| `"paragraph"` | A paragraph. Note: standalone \`image\` blocks are often wrapped in a \`paragraph\` |
71| `"text"` | Plain text |
72| `"heading"` | A heading with heading level |
73| `"thematicBreak"` | A section break |
74| `"blockquote"` | A blockquote |
75| `"list"` | An ordered or unordered list |
76| `"listItem"` | |
77| `"table"` | A table |
78| `"tableRow"` | A row in a table |
79| `"tableCell"` | A cell in a table |
80| `"html"` | Raw HTML embedded in Markdown. Disabled by default. |
81| `"code"` | A code block |
82| `"yaml"` | A metadata block. If the block is not at the top of the document, it will start a new section. |
83| `"definition"` | A definition that can be referenced |
84| `"footnoteDefinition"` | A footnote |
85| `"emphasis"` | emphasis (often in italics) |
86| `"strong"` | strong (often in bold type) |
87| `"delete"` | deleted content |
88| `"inlineCode"` | inline code |
89| `"break"` | A line break |
90| `"link"` | A hyperlink |
91| `"image"` | An image |
92| `"linkReference"` | A pointer to a link |
93| `"imageReference"` | A pointer to an image |
94| `"footnote"` | A footnote |
95| `"footnoteReference"` | A reference to a footnote |
96| `"embed"` | Content embedded from another page, identified by the \`url\` attribute. |
97| `"dataEmbed"` | Data embedded from another data source (API), identified by the \`url\` attribute. |
98| `"section"` | A section within the document. Sections serve as a high-level structure of a single markdown document and can have their own section-specific front matter metadata. |
99| `"icon"` | An SVG icon, identified by the syntax \`:foo:\` |
100
101## children
102
103
104
105
106`children`
107
108- is optional
109- Type: an array of merged types ([Details](mdast-properties-children-items.md))
110- cannot be null
111- defined in: [MDAST](mdast-properties-children.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/children")
112
113### children Type
114
115an array of merged types ([Details](mdast-properties-children-items.md))
116
117## position
118
119Marks the position of an AST node in the original text flow
120
121
122`position`
123
124- is optional
125- Type: `object` ([Position](section-definitions-section-properties-position.md))
126- cannot be null
127- defined in: [MDAST](section-definitions-section-properties-position.md "https://ns.adobe.com/helix/pipeline/position#/properties/position")
128
129### position Type
130
131`object` ([Position](section-definitions-section-properties-position.md))
132
133## value
134
135The string value of the node, if it is a terminal node.
136
137
138`value`
139
140- is optional
141- Type: `string`
142- cannot be null
143- defined in: [MDAST](mdast-properties-value.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/value")
144
145### value Type
146
147`string`
148
149## payload
150
151The payload of a frontmatter/yaml block
152
153
154`payload`
155
156- is optional
157- Type: `object` ([Details](mdast-properties-payload.md))
158- cannot be null
159- defined in: [MDAST](mdast-properties-payload.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/payload")
160
161### payload Type
162
163`object` ([Details](mdast-properties-payload.md))
164
165## depth
166
167The heading level
168
169
170`depth`
171
172- is optional
173- Type: `integer`
174- cannot be null
175- defined in: [MDAST](mdast-properties-depth.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/depth")
176
177### depth Type
178
179`integer`
180
181### depth Constraints
182
183**maximum**: the value of this number must smaller than or equal to: `6`
184
185**minimum**: the value of this number must greater than or equal to: `1`
186
187## ordered
188
189Is the list ordered
190
191
192`ordered`
193
194- is optional
195- Type: `boolean`
196- cannot be null
197- defined in: [MDAST](mdast-properties-ordered.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/ordered")
198
199### ordered Type
200
201`boolean`
202
203## start
204
205Starting item of the list
206
207
208`start`
209
210- is optional
211- Type: `integer`
212- can be null
213- defined in: [MDAST](mdast-properties-start.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/start")
214
215### start Type
216
217`integer`
218
219## spread
220
221A spread field can be present. It represents that any of its items is separated by a blank line from its siblings or contains two or more children (when true), or not (when false or not present).
222
223
224`spread`
225
226- is optional
227- Type: `boolean`
228- can be null
229- defined in: [MDAST](mdast-properties-spread.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/spread")
230
231### spread Type
232
233`boolean`
234
235## checked
236
237A checked field can be present. It represents whether the item is done (when true), not done (when false), or indeterminate or not applicable (when null or not present).
238
239
240`checked`
241
242- is optional
243- Type: `boolean`
244- can be null
245- defined in: [MDAST](mdast-properties-checked.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/checked")
246
247### checked Type
248
249`boolean`
250
251## align
252
253For tables, an align field can be present. If present, it must be a list of alignTypes. It represents how cells in columns are aligned.
254
255
256`align`
257
258- is optional
259- Type: `string[]`
260- cannot be null
261- defined in: [MDAST](mdast-properties-align.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/align")
262
263### align Type
264
265`string[]`
266
267## lang
268
269For code, a lang field can be present. It represents the language of computer code being marked up.
270
271
272`lang`
273
274- is optional
275- Type: `string`
276- can be null
277- defined in: [MDAST](mdast-properties-lang.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/lang")
278
279### lang Type
280
281`string`
282
283## identifier
284
285For associations, an identifier field must be present. It can match an identifier field on another node.
286
287
288`identifier`
289
290- is optional
291- Type: `string`
292- cannot be null
293- defined in: [MDAST](mdast-properties-identifier.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/identifier")
294
295### identifier Type
296
297`string`
298
299## label
300
301For associations, a label field can be present. It represents the original value of the normalised identifier field.
302
303
304`label`
305
306- is optional
307- Type: `string`
308- cannot be null
309- defined in: [MDAST](mdast-properties-label.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/label")
310
311### label Type
312
313`string`
314
315## url
316
317For resources, an url field must be present. It represents a URL to the referenced resource.
318
319
320`url`
321
322- is optional
323- Type: `string`
324- cannot be null
325- defined in: [MDAST](mdast-properties-url.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/url")
326
327### url Type
328
329`string`
330
331### url Constraints
332
333**URI reference**: the string must be a URI reference, according to [RFC 3986](https://tools.ietf.org/html/rfc4291 "check the specification")
334
335## meta
336
337
338
339
340`meta`
341
342- is optional
343- Type: `object` ([Details](meta-definitions-meta.md))
344- can be null
345- defined in: [MDAST](meta-definitions-meta.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/meta")
346
347### meta Type
348
349`object` ([Details](meta-definitions-meta.md))
350
351## title
352
353Extracted title of the document
354
355
356`title`
357
358- is optional
359- Type: `string`
360- can be null
361- defined in: [MDAST](mdast-properties-title.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/title")
362
363### title Type
364
365`string`
366
367## code
368
369Icon code
370
371
372`code`
373
374- is optional
375- Type: `string`
376- cannot be null
377- defined in: [MDAST](mdast-properties-code.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/code")
378
379### code Type
380
381`string`
382
383### code Constraints
384
385**pattern**: the string must match the following regular expression:
386
387```regexp
388:[a-zA-Z0-9_-]+:
389```
390
391[try pattern](https://regexr.com/?expression=%3A%5Ba-zA-Z0-9_-%5D%2B%3A "try regular expression with regexr.com")
392
393## intro
394
395Extracted first paragraph of the document
396
397
398`intro`
399
400- is optional
401- Type: `string`
402- can be null
403- defined in: [MDAST](mdast-properties-intro.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/intro")
404
405### intro Type
406
407`string`
408
409## image
410
411Path (can be relative) to the first image in the document
412
413
414`image`
415
416- is optional
417- Type: `string`
418- can be null
419- defined in: [MDAST](mdast-properties-image.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/image")
420
421### image Type
422
423`string`
424
425### image Constraints
426
427**URI reference**: the string must be a URI reference, according to [RFC 3986](https://tools.ietf.org/html/rfc4291 "check the specification")
428
429## types
430
431The inferred class names for the section
432
433
434`types`
435
436- is optional
437- Type: `string[]`
438- cannot be null
439- defined in: [MDAST](mdast-properties-types.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/types")
440
441### types Type
442
443`string[]`
444
445## alt
446
447An alt field should be present. It represents equivalent content for environments that cannot represent the node as intended.
448
449
450`alt`
451
452- is optional
453- Type: `string`
454- can be null
455- defined in: [MDAST](mdast-properties-alt.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/alt")
456
457### alt Type
458
459`string`
460
461## referenceType
462
463Represents the explicitness of a reference.
464
465
466`referenceType`
467
468- is optional
469- Type: unknown
470- cannot be null
471- defined in: [MDAST](mdast-properties-referencetype.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/referenceType")
472
473### referenceType Type
474
475unknown
476
477### referenceType Constraints
478
479**enum**: the value of this property must be equal to one of the following values:
480
481| Value | Explanation |
482| :------------ | ------------------------------------------------------------------- |
483| `"shortcut"` | the reference is implicit, its identifier inferred from its content |
484| `"collapsed"` | the reference is explicit, its identifier inferred from its content |
485| `"full"` | the reference is explicit, its identifier explicitly set |
486
487## data
488
489data is guaranteed to never be specified by unist or specifications implementing unist. Free data space.
490
491
492`data`
493
494- is optional
495- Type: `object` ([Details](mdast-properties-data.md))
496- cannot be null
497- defined in: [MDAST](mdast-properties-data.md "https://ns.adobe.com/helix/pipeline/mdast#/properties/data")
498
499### data Type
500
501`object` ([Details](mdast-properties-data.md))