UNPKG

6.46 kBJSONView Raw
1{"meta:license":["Copyright 2018 Adobe. All rights reserved.","This file is licensed to you under the Apache License, Version 2.0 (the \"License\");","you may not use this file except in compliance with the License. You may obtain a copy","of the License at http://www.apache.org/licenses/LICENSE-2.0","","Unless required by applicable law or agreed to in writing, software distributed under","the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS","OF ANY KIND, either express or implied. See the License for the specific language","governing permissions and limitations under the License."],"$id":"https://ns.adobe.com/helix/pipeline/mdast","$schema":"http://json-schema.org/draft-07/schema#","type":"object","title":"MDAST","meta:status":"stable","description":"A node in the Markdown AST","additionalProperties":false,"properties":{"type":{"enum":["root","paragraph","text","heading","thematicBreak","blockquote","list","listItem","table","tableRow","tableCell","html","code","yaml","definition","footnoteDefinition","emphasis","strong","delete","inlineCode","break","link","image","linkReference","imageReference","footnote","footnoteReference","embed","dataEmbed","section","icon"],"meta:enum":{"root":"The root node, representing a document or section","paragraph":"A paragraph. Note: standalone `image` blocks are often wrapped in a `paragraph`","text":"Plain text","heading":"A heading with heading level","thematicBreak":"A section break","blockquote":"A blockquote","list":"An ordered or unordered list","table":"A table","tableRow":"A row in a table","tableCell":"A cell in a table","html":"Raw HTML embedded in Markdown. Disabled by default.","code":"A code block","yaml":"A metadata block. If the block is not at the top of the document, it will start a new section.","definition":"A definition that can be referenced","footnoteDefinition":"A footnote","emphasis":"emphasis (often in italics)","strong":"strong (often in bold type)","delete":"deleted content","inlineCode":"inline code","break":"A line break","link":"A hyperlink","image":"An image","linkReference":"A pointer to a link","imageReference":"A pointer to an image","footnote":"A footnote","footnoteReference":"A reference to a footnote","embed":"Content embedded from another page, identified by the `url` attribute.","dataEmbed":"Data embedded from another data source (API), identified by the `url` attribute.","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.","icon":"An SVG icon, identified by the syntax `:foo:`"},"description":"The node type of the MDAST node"},"children":{"type":"array","items":{"oneOf":[{"$ref":"https://ns.adobe.com/helix/pipeline/mdast"},{"$ref":"https://ns.adobe.com/helix/pipeline/section#/definitions/section"}]}},"position":{"$ref":"https://ns.adobe.com/helix/pipeline/position"},"value":{"type":"string","description":"The string value of the node, if it is a terminal node."},"payload":{"type":"object","description":"The payload of a frontmatter/yaml block"},"depth":{"type":"integer","minimum":1,"maximum":6,"description":"The heading level"},"ordered":{"type":"boolean","description":"Is the list ordered"},"start":{"type":["null","integer"],"description":"Starting item of the list"},"spread":{"type":["null","boolean"],"description":"A 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)."},"checked":{"type":["null","boolean"],"description":"A 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)."},"align":{"description":"For tables, an align field can be present. If present, it must be a list of alignTypes. It represents how cells in columns are aligned.","type":"array","items":{"type":["null","string"],"enum":["left","right","center",null]}},"lang":{"type":["null","string"],"description":"For code, a lang field can be present. It represents the language of computer code being marked up."},"identifier":{"type":"string","description":"For associations, an identifier field must be present. It can match an identifier field on another node."},"label":{"type":"string","description":"For associations, a label field can be present. It represents the original value of the normalised identifier field."},"url":{"type":"string","format":"uri-reference","description":"For resources, an url field must be present. It represents a URL to the referenced resource."},"meta":{"$ref":"https://ns.adobe.com/helix/pipeline/meta#/definitions/meta"},"title":{"type":["null","string"],"description":"Extracted title of the document"},"code":{"type":"string","pattern":":[a-zA-Z0-9_-]+:","description":"Icon code"},"intro":{"type":["null","string"],"description":"Extracted first paragraph of the document"},"image":{"type":["null","string"],"format":"uri-reference","description":"Path (can be relative) to the first image in the document"},"types":{"type":"array","description":"The inferred class names for the section","items":{"type":"string"}},"alt":{"type":["string","null"],"description":"An alt field should be present. It represents equivalent content for environments that cannot represent the node as intended."},"referenceType":{"enum":["shortcut","collapsed","full"],"description":"Represents the explicitness of a reference.","meta:enum":{"shortcut":"the reference is implicit, its identifier inferred from its content","collapsed":"the reference is explicit, its identifier inferred from its content","full":"the reference is explicit, its identifier explicitly set"}},"data":{"type":"object","description":"data is guaranteed to never be specified by unist or specifications implementing unist. Free data space.","additionalProperties":true,"types":{"type":["null","array"],"description":"The inferred class names for the node","items":{"type":"string"}},"hName":{"description":"May be use to override the element’s tag-name","type":["null","string"]},"hProperties":{"description":"May be used to define extra DOM element properties","type":["null","array"],"items":{"type":"object"}},"hChildren":{"description":"May be used to define extra HAST children","type":["null","array"],"items":{"type":"object"}}}}}