@@ -125,7 +125,7 @@ The component must contain either:
125
125
In a markdown file, use the component with the ** ` :: ` ** identifier.
126
126
127
127
:: code-group
128
- ``` md [index.md]
128
+ ``` mdc [index.md]
129
129
::card
130
130
The content of the card
131
131
::
@@ -156,7 +156,7 @@ A component's slots can accept content or another components.
156
156
- ** named** slots use the ` # ` identifier to render the corresponding content.
157
157
158
158
:: code-group
159
- ``` md [index.md]
159
+ ``` mdc [index.md]
160
160
::hero
161
161
Default slot text
162
162
@@ -189,7 +189,7 @@ A component's slots can accept content or another components.
189
189
MDC supports nested components inside slots by indenting them.
190
190
191
191
:: code-group
192
- ``` md [index.md]
192
+ ``` mdc [index.md]
193
193
::hero
194
194
:::card
195
195
A nested card
@@ -230,7 +230,7 @@ The `unwrap` prop accepts an HTML tag that will be used to unwrap the content, u
230
230
</template >
231
231
```
232
232
233
- ``` md [index.md]
233
+ ``` mdc [index.md]
234
234
::the-title
235
235
A [rich text](/) will be **rendered** by the component.
236
236
::
@@ -256,7 +256,7 @@ Inline components are components without slots or `<ContentSlot />`.
256
256
They can be used with the ` : ` identifier.
257
257
258
258
:: code-group
259
- ``` md [index.md]
259
+ ``` mdc [index.md]
260
260
# Title
261
261
262
262
:banner
@@ -273,7 +273,7 @@ They can be used with the `:` identifier.
273
273
274
274
If you want to use an inline component followed by specific characters like ` - ` , ` _ ` or ` : ` , you can use a dummy props specifier after it.
275
275
276
- ``` md
276
+ ``` mdc
277
277
:hello{}-world
278
278
```
279
279
@@ -288,7 +288,7 @@ There are two ways to pass props to components using MDC.
288
288
The ` {} ` identifier passes props to components in a terse way by using a ` key=value ` syntax.
289
289
290
290
:: code-group
291
- ``` md [index.md]
291
+ ``` mdc [index.md]
292
292
::alert{type="warning"}
293
293
The **alert** component.
294
294
::
@@ -315,15 +315,15 @@ The `{}` identifier passes props to components in a terse way by using a `key=va
315
315
316
316
Multiple props can be separated with a space:
317
317
318
- ``` md
318
+ ``` mdc
319
319
::alert{type="warning" icon="exclamation-circle"}
320
320
Oops! An error occurred
321
321
::
322
322
```
323
323
324
324
The ` v-bind ` shorthand ` : ` can be also be used to bind a prop to a value in the front matter.
325
325
326
- ``` md
326
+ ``` mdc
327
327
---
328
328
type: "warning"
329
329
---
@@ -337,17 +337,17 @@ If you want to pass arrays or objects as props to components you can pass them a
337
337
Note that in this case you should use single quotes for the value string so you can use double quotes to pass a valid JSON string:
338
338
339
339
:: code-group
340
- ``` md [array.md]
340
+ ``` mdc [array.md]
341
341
::dropdown{:items='["Nuxt", "Vue", "React"]'}
342
342
::
343
343
```
344
344
345
- ``` md [number-array.md]
345
+ ``` mdc [number-array.md]
346
346
::dropdown{:items='[1,2,3.5]'}
347
347
::
348
348
```
349
349
350
- ``` md [object.md]
350
+ ``` mdc [object.md]
351
351
::chart{:options='{"responsive": true, "scales": {"y": {"beginAtZero": true}}}'}
352
352
::
353
353
```
@@ -358,7 +358,7 @@ Note that in this case you should use single quotes for the value string so you
358
358
The YAML method uses the ` --- ` identifier to declare one prop per line, that can be useful for readability.
359
359
360
360
:: code-group
361
- ``` md [index.md]
361
+ ``` mdc [index.md]
362
362
::icon-card
363
363
---
364
364
icon: IconNuxt
@@ -413,7 +413,7 @@ The YAML method uses the `---` identifier to declare one prop per line, that can
413
413
To create inline spans in your text you can use the ` [] ` identifier.
414
414
415
415
:: code-group
416
- ``` md [Code]
416
+ ``` mdc [Code]
417
417
Hello [World]{style="background-color: var(--color-primary-500)"}!
418
418
```
419
419
@@ -429,7 +429,7 @@ Attributes are useful for highlighting and modifying part of paragraph. The synt
429
429
Possible values are all named attributes, classes with the notation ` .class-name ` and an ID with ` #id-name ` .
430
430
431
431
:: code-group
432
- ``` md [Code]
432
+ ``` mdc [Code]
433
433
Hello [World]{style="color: green;" .custom-class #custom-id}!
434
434
```
435
435
@@ -464,7 +464,7 @@ You can bind data within your Markdown document using the `{{ $doc.variable || '
464
464
465
465
### Example 1: Define in YAML
466
466
467
- ``` md
467
+ ``` mdc
468
468
---
469
469
title: 'Title of the page'
470
470
description: 'meta description of the page'
@@ -491,7 +491,7 @@ const mdcVars = ref({ name: 'Maxime'});
491
491
</script >
492
492
```
493
493
494
- ``` md
494
+ ``` mdc
495
495
496
496
# Hello {{ $doc.name || 'World' }}
497
497
0 commit comments