summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/integrations/markdoc/README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/integrations/markdoc/README.md b/packages/integrations/markdoc/README.md
index 246da3686..89e1f76aa 100644
--- a/packages/integrations/markdoc/README.md
+++ b/packages/integrations/markdoc/README.md
@@ -405,7 +405,7 @@ This can now be accessed as `$frontmatter` in your Markdoc.
The Astro Markdoc integration handles configuring Markdoc options and capabilities that are not available through the `markdoc.config.js` file.
-### allowHTML
+### `allowHTML`
Enables writing HTML markup alongside Markdoc tags and nodes.
@@ -413,11 +413,6 @@ By default, Markdoc will not recognize HTML markup as semantic content.
To achieve a more Markdown-like experience, where HTML elements can be included alongside your content, set `allowHTML:true` as a `markdoc` integration option. This will enable HTML parsing in Markdoc markup.
-> **Warning**
-> When `allowHTML` is enabled, HTML markup inside Markdoc documents will be rendered as actual HTML elements (including `<script>`), making attack vectors like XSS possible.
->
-> Ensure that any HTML markup comes from trusted sources.
-
```js {7} "allowHTML: true"
// astro.config.mjs
import { defineConfig } from 'astro/config';
@@ -429,6 +424,11 @@ export default defineConfig({
});
```
+> **Caution**
+> When `allowHTML` is enabled, HTML markup inside Markdoc documents will be rendered as actual HTML elements (including `<script>`), making attack vectors like XSS possible.
+>
+> Ensure that any HTML markup comes from trusted sources.
+
## Examples
- The [Astro Markdoc starter template](https://github.com/withastro/astro/tree/latest/examples/with-markdoc) shows how to use Markdoc files in your Astro project.