Skip to content

Commit ed72d8a

Browse files
committed
docs: lint markdown files with mdclint
1 parent a27dcae commit ed72d8a

File tree

26 files changed

+175
-97
lines changed

26 files changed

+175
-97
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Nuxt Content reads the `content/` directory in your project, parses `.md`, `.yml
2626
- Powerful query builder on top of SQLite database
2727
- [... and more](https://content3.nuxt.dev)
2828

29-
3029
## 💻 Development
3130

3231
- Clone repository

docs/content/docs/1.getting-started/3.configuration.md

-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ Content module uses files path to generate the slug, default title and content o
242242

243243
If set to `true`, the path will be prefixed with a leading slash. Default value is `true`.
244244

245-
246245
### `pathMeta.slugifyOptions`
247246

248247
Content module uses [slugify](https://github.com/simov/slugify) to generate the slug, you can customize the behavior of slugify with this option.

docs/content/docs/1.getting-started/4.migration.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const v2Surround = await queryContent(targetPath)
100100

101101
// Content v3 - don't forget to create `content` collection in `content.config.ts`
102102
const v3Surround = await queryCollectionItemSurroundings(
103-
'content',
103+
'content',
104104
targetPath,
105105
{
106106
fields: ['title', 'description', 'navigation']
@@ -118,4 +118,3 @@ Many `ProsePre` components are thin wrappers around the `ProseCode` component. W
118118
Suggested Changes
119119
1. Your _current_ `ProseCode` logic should be moved to `ProsePre`
120120
2. Rename your `ProseCodeInline` component to `ProseCode`
121-

docs/content/docs/2.collections/1.collections.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default defineContentConfig({
5050

5151
Schemas enforce data consistency within a collection and serve as the source of truth for TypeScript types.
5252

53-
On top of the [built-in fields](#built-in-fields), you can define a schema by adding the `schema` property to your collection by using a [`zod`](https://zod.dev) schema:
53+
On top of the built-in fields, you can define a schema by adding the `schema` property to your collection by using a [`zod`](https://zod.dev) schema:
5454

5555
```ts [content.config.ts]
5656
import { defineCollection, defineContentConfig, z } from '@nuxt/content'

docs/content/docs/3.files/1.markdown.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ This will be rendered inside the `description` slot.
215215
:::preview-card{icon="i-lucide-eye" label="Preview"}
216216
::::example-hero
217217
My Page Title
218-
218+
219219
#description
220220
This will be rendered inside the `description` slot.
221221
::::
@@ -235,15 +235,15 @@ You can use Markdown inside your components slots:
235235
A [rich text](/) will be **rendered** by the component.
236236
::
237237
```
238-
238+
239239
```html [MyTitle.vue]
240240
<template>
241241
<h1 class="text-4xl">
242242
<slot mdc-unwrap="p" />
243243
</h1>
244244
</template>
245245
```
246-
246+
247247
::::preview-card{icon="i-lucide-eye" label="Preview"}
248248
:::::example-title
249249
A [rich text](/) will be **rendered** by the component.
@@ -384,7 +384,7 @@ defineProps({
384384

385385
Attributes are useful for highlighting and modifying part of paragraph. The syntax is nearly similar to inline components and markdown links syntax.
386386

387-
Possible values ​​are all named attributes, classes with the notation `.class-name` and an ID with `#id-name`.
387+
Possible values are all named attributes, classes with the notation `.class-name` and an ID with `#id-name`.
388388

389389
::code-group
390390
```mdc [index.md]
@@ -402,25 +402,25 @@ In addition to mdc components and `span`, attribute syntax will work on images,
402402
```md [index.md]
403403
Attributes work on:
404404

405-
- ![](/favicon.ico){style="display: inline; margin: 0;"} image,
405+
- ![favicon](/favicon.ico){style="display: inline; margin: 0;"} image,
406406
- [link](#attributes){style="background-color: pink;"}, `code`{style="color: cyan;"},
407407
- _italic_{style="background-color: yellow; color:black;"} and **bold**{style="background-color: lightgreen;"} texts.
408408
```
409409

410410
:::preview-card{prose label="Preview"}
411411
Attributes work on:
412-
413-
- ![](/favicon.ico){style="display: inline; margin: 0;"} image,
412+
413+
- ![favicon](/favicon.ico){style="display: inline; margin: 0;"} image,
414414
- [link](#attributes){style="background-color: pink;"}, `code`,
415-
- _italic_ and **bold** texts.
415+
- *italic* and **bold** texts.
416416
:::
417417
::
418418

419419
## Binding Data in Markdown
420420

421421
You can bind data within your Markdown document using the `{{ $doc.variable || 'defaultValue' }}` syntax. These values can be defined in the YAML front matter at the top of the document, within each MDC component, or injected using the `data` prop of the `<ContentRenderer>` component.
422422

423-
#### Example 1: Define in YAML
423+
### Example 1: Define in YAML
424424

425425
```mdc
426426
---

docs/content/docs/3.utils/2.query-collection-navigation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: The queryCollectionNavigation composable generates the navigation
88

99
```ts
1010
function queryCollectionNavigation<T extends keyof PageCollections>(
11-
collection: T,
11+
collection: T,
1212
fields?: Array<keyof PageCollections[T]>
1313
): ChainablePromise<T, ContentNavigationItem[]>
1414

docs/content/docs/3.utils/3.query-collection-item-surroundings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ description: The queryCollectionItemSurroundings composable looks for sibling
88

99
```ts
1010
function queryCollectionItemSurroundings<T extends keyof PageCollections>(
11-
collection: T,
12-
path: string,
11+
collection: T,
12+
path: string,
1313
opts?: SurroundOptions<keyof PageCollections[T]>
1414
): ChainablePromise<T, ContentNavigationItem[]>
1515

docs/content/docs/4.components/2.prose.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
8989

9090
:::preview-card{icon="i-lucide-eye" label="Preview"}
9191
`code`
92-
92+
9393
`const code: string = 'highlighted code inline'`
9494
:::
9595
::
@@ -102,6 +102,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
102102
```
103103

104104
:::preview-card{.pt-4 label="Preview"}
105+
<!-- markdownlint-disable-next-line -->
105106
# H1 Heading
106107
:::
107108
::
@@ -114,6 +115,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
114115
```
115116

116117
:::preview-card{icon="i-lucide-eye" label="Preview"}
118+
<!-- markdownlint-disable-next-line -->
117119
## H2 Heading
118120
:::
119121
::
@@ -126,6 +128,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
126128
```
127129

128130
:::preview-card{icon="i-lucide-eye" label="Preview"}
131+
<!-- markdownlint-disable-next-line -->
129132
### H3 Heading
130133
:::
131134
::
@@ -138,6 +141,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
138141
```
139142

140143
:::preview-card{icon="i-lucide-eye" label="Preview"}
144+
<!-- markdownlint-disable-next-line -->
141145
#### H4 Heading
142146
:::
143147
::
@@ -150,6 +154,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
150154
```
151155

152156
:::preview-card{icon="i-lucide-eye" label="Preview"}
157+
<!-- markdownlint-disable-next-line -->
153158
##### H5 Heading
154159
:::
155160
::
@@ -162,6 +167,7 @@ If you want to use `]` in the filename, you need to escape it with 2 backslashes
162167
```
163168

164169
:::preview-card{icon="i-lucide-eye" label="Preview"}
170+
<!-- markdownlint-disable-next-line -->
165171
###### H6 Heading
166172
:::
167173
::
@@ -179,9 +185,9 @@ Divider above.
179185

180186
:::preview-card{icon="i-lucide-eye" label="Preview"}
181187
Divider under.
182-
188+
183189
---
184-
190+
185191
Divider above.
186192
:::
187193
::
@@ -292,12 +298,13 @@ _Just an italic paragraph._
292298
```
293299

294300
:::preview-card{icon="i-lucide-eye" label="Preview"}
295-
| | | |
296-
| --- | --------- | ----------- |
301+
297302
| Key | Type | Description |
303+
| --- | --------- | ----------- |
298304
| 1 | Wonderful | Table |
299305
| 2 | Wonderful | Data |
300306
| 3 | Wonderful | Website |
307+
301308
:::
302309
::
303310

docs/content/docs/7.studio/1.setup.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ The `__studio.json` file is generated but you encounter a `Forbidden error: inva
8080
This information should be populated automatically in most cases. We support most popular providers (Vercel, Netlify, etc.), but if you're using a non supported provider or a custom one, it may not be fetched correctly.
8181
::
8282

83+
<!-- markdownlint-disable-next-line -->
8384
2. You can manually override this data by setting those configs in your `nuxt.config.ts`:
8485

8586
```ts [nuxt.config.ts]
@@ -90,11 +91,12 @@ export default defineNuxtConfig({
9091
gitInfo: {
9192
name: 'Your repository name',
9293
owner: 'Your repository owner/organization',
93-
url: 'Your GitHub repository URL'
94+
url: 'Your GitHub repository URL'
9495
}
9596
}
9697
}
9798
})
9899
```
99100

101+
<!-- markdownlint-disable-next-line -->
100102
3. By ensuring these fields are correctly set, you can resolve the `Forbidden error` and successfully enable your site preview on Nuxt Studio. If not, please contact us on the [Discord server](https://discord.gg/sBXDm6e8SP).

docs/content/docs/7.studio/3.content.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ seo:
1212

1313
Nuxt Studio offers a versatile workspace for both developers and content writers, giving them the freedom to choose between our differents editors:
1414

15-
- [Notion-like editor](#markdown-editor-markdown-files) for `Markdown` files
15+
- [Notion-like editor](#notion-like-editor-markdown-files) for `Markdown` files
1616
- [Form editor](#form-editor-yaml-and-json-files) for `YAML` and `JSON` files
1717
- [Code editor](#code-editor) for any kind of files (for technical users only)
1818

@@ -55,6 +55,7 @@ One of this editor standout features is its ability to integrate and customize a
5555
In other terms, a developer can create any kind of visually complex components and editors will be able to use them and focus on the content. An editor can also tweak the component properties, styles, and behavior to fit its specific requirements as long as the developer made it customizable.
5656

5757
::steps{level="4"}
58+
5859
#### Create your component
5960

6061
You can create Vue components and integrate them into Markdown. They just need to be located in the `/components/content` folder to be available.

docs/content/docs/7.studio/5.config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineAppConfig({})
2525

2626
To create a customized editing experience for your `app.config.ts` in Studio, you need to create a `nuxt.schema.ts` file in your project. This schema serves as a representation of your `app.config.ts`.
2727

28-
#### Helpers
28+
### Helpers
2929

3030
- The `group` method allows you to customize parent objects.
3131
- The `field` method allows you to customize inputs (aka leaf).

docs/content/docs/7.studio/6.debug.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ It can help if:
1919
## Tutorial
2020

2121
::steps
22-
### Start by importing your project on Studio.
2322

24-
### Clone your repository on local.
23+
### Start by importing your project on Studio
24+
25+
### Clone your repository on local
2526

2627
### Enable the Studio module in development
2728

@@ -48,7 +49,8 @@ npx nuxt dev --tunnel
4849

4950
`__studio.json` file should accessible from `https://your-localtunnel-url/__studio.json`
5051

51-
### Copy the tunnel URL and copy it in the self-hosting section of the deployment tab on Studio platform.
52+
### Copy the tunnel URL and copy it in the self-hosting section of the deployment tab on Studio platform
53+
5254
::
5355

5456
::tip

0 commit comments

Comments
 (0)