RegistryContentNode
A content node. Clients render ‘markdown’ for any ‘kind’ they do not recognize.
Properties
kindstring requiredNode kind. Known kinds: ’text’, ‘code’, ’language-chooser’, ‘os-chooser’. A ‘code’ node appears where a ’lang’ or ‘os’ filter collapsed a chooser to its single matching snippet. Render ‘markdown’ for unrecognized kinds.markdownstring requiredMarkdown content. For ’text’ nodes, the content itself. For chooser nodes, a concatenation of options for fallback rendering.- Options for chooser nodes; absent for ’text'.
- ↳
kindstring optionalOption kind. Known kinds: ‘code’ (content is a bare code snippet with no fence) and ’text’ (content is markdown). Render ‘markdown’ for unrecognized kinds. - ↳
languagestring optionalThe language this option applies to (for ’language-chooser’ nodes). One of: typescript, python, go, csharp, java, yaml. When an option declares several languages this is the first of ’languages'. - ↳
languagesarray[string] optionalEvery language this option applies to (for ’language-chooser’ nodes). A single option can serve several languages, e.g. a snippet shared by csharp and fsharp. - ↳
osstring optionalThe operating system this option applies to (for ‘os-chooser’ nodes). One of: linux, macos, windows. - ↳
contentstring requiredThe content for this option, typically a code snippet or instructions. Interpretation depends on ‘kind’; prefer ‘markdown’ unless you need the bare snippet. - ↳
markdownstring requiredThe option rendered as markdown, whatever its kind: ‘code’ options are returned fenced with their language. Render this when you do not handle ‘kind’ specifically.