docs-builder
Loading

Directives

Directives extend Markdown with additional features:

:::{note}
This is a callout box that stands out from regular text.
:::
		

How directive syntax works:

  • ::: opens and closes the directive block
  • {note} is the directive type (always in curly braces)
  • Content inside is regular Markdown
:::{image} screenshot.png
:alt: Dashboard overview
:width: 600px
:::
		
  1. Options start with : and appear after the opening line.
:::{include} shared-content.md
:::
		

The argument comes right after the directive name.

To nest directives, add more colons to the outer directive:

::::{note}
Outer content

:::{hint}
Inner content
:::

More outer content
::::
		

Use four colons (::::) for the outer directive and three (:::) for the inner one. Need to nest deeper? Keep adding colons.

Code blocks and applies_to blocks use backticks instead of colons to prevent content from being processed as Markdown:

```js
const x = 1;
```
		

The following directives are available: