[docs] Markdoc README syntax fixes (#7798)
This commit is contained in:
parent
0d86457d64
commit
32cedb3dab
1 changed files with 6 additions and 6 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue