Last updated

Markdoc Tag Library

This page contains a comprehensive list of Markdoc tags with links to deeper resources where you can see how to use them. Some tags are built into Markdoc while others are Redocly-specific. We use badges to indicate a tag's availability:

BadgeMeaning
Redocly Custom Tag Tags built into Redocly products and available for customers to use in their projects.
Built-in Markdoc Tag Tags built into Markdoc's core that are available to all Markdoc users.

Admonition Redocly Custom Tag

Use the Admonition tag to highlight important information. Choose from multiple pre-defined types like info, warning, and success.

Additional information and syntax: Admonition tag

Example admonition element:

Read this thing!

This tag is useful for drawing attention.


JSON Schema Redocly Custom Tag

Use the JSON Schema tag to render an existing or inline schema in a configurable, readable layout.

Additional information and syntax: JSON Schema tag

Example JSON schema element:

namestring(EventName)

Name of the special event

Example:

"Pirate Coding Workshop"

locationstring(EventLocation)

Location where the special event is held

Example:

"Computer Room"

eventDescriptionstring(EventDescription)

Description of the special event

Example:

"Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang)."

datesArray of strings(date)(EventDates)

List of planned dates for the special event

Example:

["2023-10-29"]

pricenumber(float)(EventPrice)

Price of a ticket for the special event

Example:

25


Code Snippet Redocly Custom Tag

Use the Code Snippet tag to render a code sample from an external file in a configurable code block element.

Additional information and syntax: Code Snippet tag

Example code snippet element:

museum-redocly.yaml
    - group: Markdoc Tag Library  
      page: docs/learn-markdoc/tags/tag-library.md
      items:
      - separator: Built-in tags
      - page: docs/learn-markdoc/tags/partial.md
        label: Partial
      - separator: Redocly Tags
      - page: docs/learn-markdoc/tags/admonition.md
        label: Admonition
      - page: docs/learn-markdoc/tags/code-snippet.md
        label: Code Snippet
      - page: docs/learn-markdoc/tags/json-schema.md
        label: JSON Schema
      - page: docs/learn-markdoc/tags/openapi-code-sample.md
        label: OpenAPI Code Sample
      - page: docs/learn-markdoc/tags/tabs.md
        label: Tabs

OpenAPI Code Sample Redocly Custom Tag

Use the OpenAPI Code sample tag to render a code sample for an API operation from an OpenAPI description.

Additional information and syntax: OpenAPI Code Sample tag

curl -i -X DELETE \
  -u custom-username:custom-password \
  https://api.fake-museum-example.com/v1/special-events/dad4bce8-f5cb-4078-a211-995864315e39

Partial Built-in Markdoc Tag

Use the Partial tag to render the content from another file.

Additional information and syntax: Partial tag

Example partial element:

Hello, World! ✋ 🌎.

This content is written in a separate file. Neat.


Tabs Redocly Custom Tag

Use the tabs tag to organize content into a series of tabs that users can switch between.

Additional information and syntax: Tabs tag

  • Tomato (it's both!)
  • Blueberry
  • Kiwi
  • Banana