返回 slidev
comark.md
根目录 / docs / features / comark.md
1 ---
2 relates:
3 - Comark Syntax: https://comark.dev/syntax/markdown
4 - '@comark/markdown-it': https://github.com/comarkdown/comark
5 since: v0.43.0
6 tags: [syntax, styling]
7 description: |
8 A powerful syntax to enhance your markdown content with components and styles.
9 ---
10
11 # Comark Syntax
12
13 Slidev supports optional [Comark Syntax](https://comark.dev/syntax/markdown) (formerly known as MDC, Markdown Components) powered by [`@comark/markdown-it`](https://github.com/comarkdown/comark).
14
15 You can enable it by adding `comark: true` to the frontmatter of your markdown file.
16
17 ```mdc
18 ---
19 comark: true
20 ---
21
22 This is a [red text]{style="color:red"} :inline-component{prop="value"}
23
24 ![](/image.png){width=500px lazy}
25
26 ::block-component{prop="value"}
27 The **default** slot
28 ::
29 ```
30
31 Learn more about [Comark Syntax](https://comark.dev/syntax/markdown).
32
32 lines MARKDOWN