Write in CommonMark Markdown and extend with 60+ MyST directives for tabs, callouts, code blocks, and interactive components.
Note
Do I need this? Yes when authoring rich docs content. Start with Writer Quickstart if you have not scaffolded a site yet. For directive syntax lookup, see Directive Kitchen Sink.
Quick Reference
**bold** and *italic*
~~strikethrough~~
`inline code`
[External](https://example.com)
[Internal](/docs/get-started/)
[[Cross-reference]] docs/page
[[#heading]] Anchor link
[[ext:python:pathlib.Path]]
$E = mc^2$
$$
\sum_{i=1}^n x_i
$$
{math}`\frac{a}{b}`
```python
def hello():
print("Hello!")
```
With line highlighting:
```python {hl_lines="2"}
def hello():
print("Highlighted!")
```
:::{note}
Informational callout.
:::
:::{warning}
Important warning!
:::
:::{tip}
Helpful suggestion.
:::
How Content Flows
Variable Substitution
Use{{ variable }}syntax to insert frontmatter values directly into your content:
---
product_name: Bengal
version: 1.0.0
beta: true
---
Welcome to **{{ product_name }}** version {{ version }}.
{% if beta %}
:::{warning}
This is a beta release.
:::
{% end %}
Note
Bengal uses Kida templating which supports both{% end %} (unified syntax) and {% endif %}(Jinja-compatible). Use whichever you prefer.
Available Variables
| Variable | Source | Example |
|---|---|---|
Content Authoring |
Current page | Content Authoring |
Markdown, MyST directives, and rich content |
Current page | Markdown, MyST directives, and rich content |
{{ product_name }} |
Frontmatter | Direct access to any frontmatter key |
| `` | Frontmatter | Hugo-style access viaparams |
Bengal |
Site config | Bengal |
/bengal |
Site config | /bengal |
Cascaded Variables
Variables cascade from parent sections. Set them once in a section's_index.md:
# docs/api/_index.md
---
title: API Reference
cascade:
api_version: v2
deprecated: false
---
Then use in any child page:
# docs/api/users.md
This endpoint uses API {{ api_version }}.
Tip
Common use cases: Product names, version numbers, feature flags, environment-specific values, and cascaded metadata like API versions or status badges.
Available Directives
Bengal provides 60+ directives organized by category:
| Category | Directives |
|---|---|
| Admonitions | note, tip, warning, danger, error, info, example, success, caution, seealso |
| Layout | tabs, tab-set, cards, card, child-cards, grid, container, steps, step, dropdown |
| Tables | list-table, data-table |
| Code | code-tabs, literalinclude |
| Media | youtube, vimeo, tiktok, video, audio, figure, gallery |
| Embeds | gist, codepen, codesandbox, stackblitz, asciinema, spotify, soundcloud |
| Navigation | breadcrumbs, siblings, prev-next, related |
| Versioning | since, deprecated, changed |
| Utilities | badge, button, icon, rubric, target, include, glossary, checklist, marimo |
Seealso
- Directives Reference — Complete directive documentation
- Icon Reference — Available icons