Skip to content

Commit 7dcbf13

Browse files
committed
docs: use mdc syntax highlight
1 parent d286c0d commit 7dcbf13

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

docs/content/2.usage/2.markdown.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The component must contain either:
125125
In a markdown file, use the component with the **`::`** identifier.
126126

127127
::code-group
128-
```md [index.md]
128+
```mdc [index.md]
129129
::card
130130
The content of the card
131131
::
@@ -156,7 +156,7 @@ A component's slots can accept content or another components.
156156
- **named** slots use the `#` identifier to render the corresponding content.
157157

158158
::code-group
159-
```md [index.md]
159+
```mdc [index.md]
160160
::hero
161161
Default slot text
162162
@@ -189,7 +189,7 @@ A component's slots can accept content or another components.
189189
MDC supports nested components inside slots by indenting them.
190190

191191
::code-group
192-
```md [index.md]
192+
```mdc [index.md]
193193
::hero
194194
:::card
195195
A nested card
@@ -230,7 +230,7 @@ The `unwrap` prop accepts an HTML tag that will be used to unwrap the content, u
230230
</template>
231231
```
232232

233-
```md [index.md]
233+
```mdc [index.md]
234234
::the-title
235235
A [rich text](/) will be **rendered** by the component.
236236
::
@@ -256,7 +256,7 @@ Inline components are components without slots or `<ContentSlot />`.
256256
They can be used with the `:` identifier.
257257

258258
::code-group
259-
```md [index.md]
259+
```mdc [index.md]
260260
# Title
261261
262262
:banner
@@ -273,7 +273,7 @@ They can be used with the `:` identifier.
273273

274274
If you want to use an inline component followed by specific characters like `-`, `_` or `:`, you can use a dummy props specifier after it.
275275

276-
```md
276+
```mdc
277277
:hello{}-world
278278
```
279279

@@ -288,7 +288,7 @@ There are two ways to pass props to components using MDC.
288288
The `{}` identifier passes props to components in a terse way by using a `key=value` syntax.
289289

290290
::code-group
291-
```md [index.md]
291+
```mdc [index.md]
292292
::alert{type="warning"}
293293
The **alert** component.
294294
::
@@ -315,15 +315,15 @@ The `{}` identifier passes props to components in a terse way by using a `key=va
315315

316316
Multiple props can be separated with a space:
317317

318-
```md
318+
```mdc
319319
::alert{type="warning" icon="exclamation-circle"}
320320
Oops! An error occurred
321321
::
322322
```
323323

324324
The `v-bind` shorthand `:` can be also be used to bind a prop to a value in the front matter.
325325

326-
```md
326+
```mdc
327327
---
328328
type: "warning"
329329
---
@@ -337,17 +337,17 @@ If you want to pass arrays or objects as props to components you can pass them a
337337
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:
338338

339339
::code-group
340-
```md [array.md]
340+
```mdc [array.md]
341341
::dropdown{:items='["Nuxt", "Vue", "React"]'}
342342
::
343343
```
344344

345-
```md [number-array.md]
345+
```mdc [number-array.md]
346346
::dropdown{:items='[1,2,3.5]'}
347347
::
348348
```
349349

350-
```md [object.md]
350+
```mdc [object.md]
351351
::chart{:options='{"responsive": true, "scales": {"y": {"beginAtZero": true}}}'}
352352
::
353353
```
@@ -358,7 +358,7 @@ Note that in this case you should use single quotes for the value string so you
358358
The YAML method uses the `---` identifier to declare one prop per line, that can be useful for readability.
359359

360360
::code-group
361-
```md [index.md]
361+
```mdc [index.md]
362362
::icon-card
363363
---
364364
icon: IconNuxt
@@ -413,7 +413,7 @@ The YAML method uses the `---` identifier to declare one prop per line, that can
413413
To create inline spans in your text you can use the `[]` identifier.
414414

415415
::code-group
416-
```md [Code]
416+
```mdc [Code]
417417
Hello [World]{style="background-color: var(--color-primary-500)"}!
418418
```
419419

@@ -429,7 +429,7 @@ Attributes are useful for highlighting and modifying part of paragraph. The synt
429429
Possible values ​​are all named attributes, classes with the notation `.class-name` and an ID with `#id-name`.
430430

431431
::code-group
432-
```md [Code]
432+
```mdc [Code]
433433
Hello [World]{style="color: green;" .custom-class #custom-id}!
434434
```
435435

@@ -464,7 +464,7 @@ You can bind data within your Markdown document using the `{{ $doc.variable || '
464464

465465
### Example 1: Define in YAML
466466

467-
```md
467+
```mdc
468468
---
469469
title: 'Title of the page'
470470
description: 'meta description of the page'
@@ -491,7 +491,7 @@ const mdcVars = ref({ name: 'Maxime'});
491491
</script>
492492
```
493493

494-
```md
494+
```mdc
495495
496496
# Hello {{ $doc.name || 'World' }}
497497

docs/content/4.components/6.content-slot.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It is useful when creating components that you want to use in your Markdown cont
2727

2828
Then using it in Markdown:
2929

30-
```md [content/index.md]
30+
```mdc [content/index.md]
3131
::fancy-header
3232
That text paragraph will be unwrapped.
3333
::

docs/content/7.v1/1.getting-started/3.writing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ It supports by default code highlighting using [PrismJS](https://prismjs.com) an
232232

233233
You can write HTML in your Markdown:
234234

235-
```md[home.md]
235+
```md [home.md]
236236
---
237237
title: Home
238238
---
@@ -302,7 +302,7 @@ But **this will**:
302302

303303
Say we have a Vue component called [ExampleMultiselect.vue](https://github.com/nuxt/content/blob/v1.14.0/docs/components/global/examples/ExampleMultiselect.vue):
304304

305-
```md[home.md]
305+
```md [home.md]
306306
Please choose a *framework*:
307307

308308
<example-multiselect :options="['Vue', 'React', 'Angular', 'Svelte']"></example-multiselect>
@@ -319,7 +319,7 @@ Please choose a <i>framework</i>:
319319

320320
You can also define the options for components in your front matter:
321321

322-
```md[home.md]
322+
```md [home.md]
323323
---
324324
multiselectOptions:
325325
- VuePress

docs/content/7.v1/3.community/1.snippets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export default {
422422

423423
- Finally use the components and mark the document to fetch the contributors
424424

425-
```md{}[document.md]
425+
```md [document.md]
426426
---
427427
title: Nuxt Content
428428
fetchContributors: true

examples/mdc/inline-component/content/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Inline Components usage in MDC
22

3-
```md
3+
```mdc
44
I am using a :github-button in the middle of a paragraph.
55
```
66

0 commit comments

Comments
 (0)