# Markdown templates diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each Markdown templates error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 25 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Runtime errors

| Code | What happened |
| --- | --- |
| [`MARKDOWN_TEMPLATE_R0002`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0002) | Unsafe Markdown template condition "\<value\>". |
| [`MARKDOWN_TEMPLATE_R0011`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0011) | Markdown template link binding "{{ \<path\> }}" must resolve to a safe destination. |
| [`MARKDOWN_TEMPLATE_R0012`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0012) | Markdown template link binding "{{ \<path\> }}" must resolve to a safe destination. |
| [`MARKDOWN_TEMPLATE_R0013`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0013) | Markdown template link binding "{{ \<path\> }}" must resolve to a safe destination. |
| [`MARKDOWN_TEMPLATE_R0014`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0014) | Markdown template must be a string. |
| [`MARKDOWN_TEMPLATE_R0015`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0015) | Markdown template \<value\> block must follow an if block. |
| [`MARKDOWN_TEMPLATE_R0017`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0017) | Markdown template binding "\<value\>" is not defined. |
| [`MARKDOWN_TEMPLATE_R0018`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0018) | Markdown template binding "\<path\>" must resolve to a scalar value. |
| [`MARKDOWN_TEMPLATE_R0020`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0020) | Markdown template Insert requires a markdown prop. Use :insert{:markdown="data.summary"}. |
| [`MARKDOWN_TEMPLATE_R0021`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0021) | Markdown template fragment cannot contain block Markdown when used inline. Put :insert on its own line, separated by blank lines. |
| [`MARKDOWN_TEMPLATE_R0022`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0022) | Markdown template else block does not accept a condition. |
| [`MARKDOWN_TEMPLATE_R0023`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0023) | Markdown template else block cannot be followed by another branch. |
| [`MARKDOWN_TEMPLATE_R0024`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0024) | Unsupported Markdown template condition prop "\<key\>". Use Comark-bound condition or value props. |
| [`MARKDOWN_TEMPLATE_R0025`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0025) | Markdown template \<tag\> block must follow an if block. |
| [`MARKDOWN_TEMPLATE_R0026`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0026) | Markdown template \<tag\> block cannot follow else. |
| [`MARKDOWN_TEMPLATE_R0027`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0027) | Markdown template else block does not accept a condition. |
| [`MARKDOWN_TEMPLATE_R0029`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0029) | Markdown template if block is missing a closing :: line. |
| [`MARKDOWN_TEMPLATE_R0030`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0030) | Markdown template binding "\<value\>" cannot target the HTML srcdoc sink. |
| [`MARKDOWN_TEMPLATE_R0031`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0031) | Markdown template binding "\<value\>" cannot target an HTML event-handler attribute. |
| [`MARKDOWN_TEMPLATE_R0032`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0032) | Markdown template binding "\<value\>" cannot target a style attribute. |
| [`MARKDOWN_TEMPLATE_R0033`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_r0033) | Markdown template binding "{{ \<path\> }}" cannot be a Markdown link destination. Use [label](){:href="\<path\>"}. |

## Build errors

| Code | What happened |
| --- | --- |
| [`MARKDOWN_TEMPLATE_B0001`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_b0001) | Markdown materialization requires a relative \<markdownTemplateFileSuffix\> path, received \<templatePath\>. |
| [`MARKDOWN_TEMPLATE_B0002`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_b0002) | Markdown materialization paths cannot escape or contain ambiguous segments, received \<templatePath\>. |

## Errors

| Code | What happened |
| --- | --- |
| [`MARKDOWN_TEMPLATE_BINDING_IN_CODE`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_binding_in_code) | The binding "{{ \<path\> }}" is inside inline code or a code block, so the template shows it as text and does not fill it. |
| [`MARKDOWN_TEMPLATE_BINDING_OUTSIDE_DATA`](https://vitehub.dev/docs/markdown-template/diagnostics/markdown_template_binding_outside_data) | The binding "\<path\>" does not start with `data.`. A template reads each value from `data`, so "\<path\>" is never defined. |

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/markdown-template.md)
- [Get started](https://vitehub.dev/raw/docs/markdown-template/get-started.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
