diff options
author | 2023-07-25 14:05:03 -0300 | |
---|---|---|
committer | 2023-07-25 14:05:03 -0300 | |
commit | 32cedb3dab96e0c73c8914b62d945a1a07b635e6 (patch) | |
tree | bd9f8bfb3b8590773fc3a0cb354ecfc69d8ac53d | |
parent | 0d86457d64e85a20ed24e2ded441324b0e3b1167 (diff) | |
download | astro-32cedb3dab96e0c73c8914b62d945a1a07b635e6.tar.gz astro-32cedb3dab96e0c73c8914b62d945a1a07b635e6.tar.zst astro-32cedb3dab96e0c73c8914b62d945a1a07b635e6.zip |
[docs] Markdoc README syntax fixes (#7798)
-rw-r--r-- | packages/integrations/markdoc/README.md | 12 |
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. |