From 12a90c4bffb5f1d4c70623ecbced07a2017ebb37 Mon Sep 17 00:00:00 2001 From: nobkd <44443899+nobkd@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:20:20 +0200 Subject: [PATCH] docs: use lowercase typings, use `|` instead of `or` in type declaration (#2167) --- .../en/1.getting-started/4.fetching.md | 34 +++++++++---------- .../en/1.getting-started/5.displaying.md | 4 +-- .../en/1.getting-started/6.configuration.md | 20 +++++------ .../en/1.getting-started/7.advanced.md | 14 ++++---- .../fr/1.getting-started/4.fetching.md | 30 ++++++++-------- .../fr/1.getting-started/5.displaying.md | 2 +- .../fr/1.getting-started/6.configuration.md | 14 ++++---- .../fr/1.getting-started/7.advanced.md | 2 +- .../ja/1.getting-started/4.fetching.md | 34 +++++++++---------- .../ja/1.getting-started/5.displaying.md | 2 +- .../ja/1.getting-started/6.configuration.md | 12 +++---- .../ja/1.getting-started/7.advanced.md | 2 +- docs/content-v1/ja/2.examples/2.docs-theme.md | 32 ++++++++--------- .../ru/1.getting-started/4.fetching.md | 34 +++++++++---------- .../ru/1.getting-started/5.displaying.md | 2 +- .../ru/1.getting-started/6.configuration.md | 16 ++++----- .../ru/1.getting-started/7.advanced.md | 2 +- docs/content/3.guide/1.writing/2.markdown.md | 10 +++--- .../4.api/1.components/1.content-doc.md | 8 ++--- .../4.api/1.components/2.content-list.md | 2 +- .../4.api/1.components/2.content-renderer.md | 6 ++-- .../4.api/1.components/4.content-query.md | 14 ++++---- docs/content/4.api/1.components/5.markdown.md | 2 +- .../4.api/1.components/6.content-slot.md | 2 +- .../4.api/2.composables/1.query-content.md | 10 +++--- .../4.api/2.composables/6.use-content-head.md | 22 ++++++------ docs/content/4.api/3.configuration.md | 34 +++++++++---------- docs/content/4.api/4.advanced.md | 8 ++--- 28 files changed, 187 insertions(+), 187 deletions(-) diff --git a/docs/content-v1/en/1.getting-started/4.fetching.md b/docs/content-v1/en/1.getting-started/4.fetching.md index aa46fbbe8..d2f140e63 100644 --- a/docs/content-v1/en/1.getting-started/4.fetching.md +++ b/docs/content-v1/en/1.getting-started/4.fetching.md @@ -10,19 +10,19 @@ This module globally injects `$content` instance, meaning that you can access it ### $content(path, options?) - `path` - - Type: `String` + - Type: `string` - Default: `/` - `options` - - Type: `Object` + - Type: `object` - Default: `{}` - Version: **>= v1.3.0** - `options.deep` - - Type: `Boolean` + - Type: `boolean` - Default: `false` - Version: **>= v1.3.0** - *Fetch files from subdirectories* - `options.text` - - Type: `Boolean` + - Type: `boolean` - Default: `false` - Version: **>= v1.4.0** - *Returns the original markdown content in a `text` variable* @@ -30,14 +30,14 @@ This module globally injects `$content` instance, meaning that you can access it > You can also give multiple arguments: `$content('articles', params.slug)` will be translated to `/articles/${params.slug}` -`path` can be a file or a directory. If `path` is a file, `fetch()` will return an `Object`, if it's a directory it will return an `Array`. +`path` can be a file or a directory. If `path` is a file, `fetch()` will return an `object`, if it's a directory it will return an `Array`. All the methods below can be chained and return a chain sequence, except `fetch` which returns a `Promise`. ### only(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `required` Select a subset of fields. @@ -49,7 +49,7 @@ const { title } = await this.$content('article-1').only(['title']).fetch() ### without(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `required` Remove a subset of fields. @@ -61,7 +61,7 @@ const { title, ...propsWithoutBody } = await this.$content('article-1').without( ### where(query) - `query` - - Type: `Object` + - Type: `object` - `required` Filter results by query. @@ -93,10 +93,10 @@ const products = await this.$content('products').where({ 'categories.slug': { $c ### sortBy(key, direction) - `key` - - Type: `String` + - Type: `string` - `required` - `direction` - - Type: `String` + - Type: `string` - Value: `'asc'` or `'desc'` - Default: `'asc'` @@ -119,7 +119,7 @@ If you need case-insensitive sorting, check out [this snippet](/snippets#case-in ### limit(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `required` Limit number of results. @@ -132,7 +132,7 @@ const articles = await this.$content('articles').limit(5).fetch() ### skip(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `required` Skip results. @@ -145,10 +145,10 @@ const articles = await this.$content('articles').skip(5).limit(5).fetch() ### search(field, value) - `field` - - Type: `String` + - Type: `string` - `required` - `value` - - Type: `String` + - Type: `string` Performs a full-text search on a field. `value` is optional, in this case `field` is the `value` and search will be performed on all defined full-text search fields. @@ -174,10 +174,10 @@ Check out [this snippet](/snippets#search) on how to implement search into your ### surround(slugOrPath, options) - `slugOrPath` - - Type: `String` + - Type: `string` - `required` - `options` - - Type: `Object` + - Type: `object` - Default: `{ before: 1, after: 1}` Get prev and next results around a specific slug or path. @@ -218,7 +218,7 @@ Check out [this snippet](/snippets#prev-and-next) on how to implement prev and n ### fetch() -- Returns: `Promise` | `Promise` +- Returns: `Promise` | `Promise` Ends the chain sequence and collects data. diff --git a/docs/content-v1/en/1.getting-started/5.displaying.md b/docs/content-v1/en/1.getting-started/5.displaying.md index ce7d016d1..752088ebe 100644 --- a/docs/content-v1/en/1.getting-started/5.displaying.md +++ b/docs/content-v1/en/1.getting-started/5.displaying.md @@ -35,10 +35,10 @@ export default { **Props:** - document: - - Type: `Object` + - Type: `object` - `required` - tag: - - Type: `String` + - Type: `string` Learn more about what you can write in your markdown file in the [writing content](/writing#markdown) section. diff --git a/docs/content-v1/en/1.getting-started/6.configuration.md b/docs/content-v1/en/1.getting-started/6.configuration.md index a29f58e61..4ae58e6be 100644 --- a/docs/content-v1/en/1.getting-started/6.configuration.md +++ b/docs/content-v1/en/1.getting-started/6.configuration.md @@ -28,7 +28,7 @@ the defaults are quite sensible. If you don't want to have the defaults included ### `apiPrefix` -- Type: `String` +- Type: `string` - Default: `'/_content'` Route that will be used for client-side API calls and SSE. @@ -42,7 +42,7 @@ content: { ### `dir` -- Type: `String` +- Type: `string` - Default: `'content'` Directory used for writing content. @@ -86,7 +86,7 @@ content: { ### `liveEdit` -- Type `Boolean` +- Type `boolean` - Default: `true` - Version: **>= v1.5.0** @@ -202,7 +202,7 @@ export default { ### `markdown.tocDepth` -- Type: `Number` +- Type: `number` - Default: `3` - Version: **>= v1.11.0** @@ -238,7 +238,7 @@ Deprecated. Use `markdown.remarkPlugins` as an array instead. ### `markdown.prism.theme` -- Type: `String` +- Type: `string` - Default: `'prismjs/themes/prism.css'` This module handles code highlighting in markdown content using [PrismJS](https://prismjs.com). @@ -435,7 +435,7 @@ export default { ### `yaml` -- Type: `Object` +- Type: `object` - Default: `{}` This module uses `js-yaml` to parse `.yaml`, `.yml` files. You can check here for [options](https://github.com/nodeca/js-yaml#api). @@ -445,21 +445,21 @@ Note that we force `json: true` option. ### `xml` -- Type: `Object` +- Type: `object` - Default: `{}` This module uses `xml2js` to parse `.xml` files. You can check here for [options](https://www.npmjs.com/package/xml2js#options). ### `csv` -- Type: `Object` +- Type: `object` - Default: `{}` This module uses `node-csvtojson` to parse csv files. You can check here for [options](https://github.com/Keyang/node-csvtojson#parameters). ### `extendParser` -- Type: `Object` +- Type: `object` - Default `{}` With this option you can define your own parsers for other file types. Also you can **overwrite** the default parser! @@ -502,7 +502,7 @@ You should be aware that you get the full markdown file content so this includes ### `useCache` -- Type: `Boolean` +- Type: `boolean` - Default: `false` When `true`, the production server (`nuxt start`) will use cached version of the content (generated after running `nuxt build`) instead of parsing files. This improves app startup time, but makes app unaware of any content changes. diff --git a/docs/content-v1/en/1.getting-started/7.advanced.md b/docs/content-v1/en/1.getting-started/7.advanced.md index 7f04518ab..eb901c5e7 100644 --- a/docs/content-v1/en/1.getting-started/7.advanced.md +++ b/docs/content-v1/en/1.getting-started/7.advanced.md @@ -72,11 +72,11 @@ Allows you to modify the contents of a file before it is handled by the parsers. Arguments: - `file` - - Type: `Object` + - Type: `object` - Properties: - - path: `String` - - extension: `String` (ex: `.md`) - - data: `String` + - path: `string` + - extension: `string` (ex: `.md`) + - data: `string` **Example** @@ -97,11 +97,11 @@ Allows you to add data to a document before it is stored. Arguments: - `document` - - Type: `Object` + - Type: `object` - Properties: - See [writing content](/writing) - `database` - - Type: `Object` + - Type: `object` - Properties: - See [type definition](https://github.com/nuxt/content/blob/master/packages/content/types/database.d.ts) @@ -155,7 +155,7 @@ Extend the content options, useful for modules that wants to read content option Arguments: - `options` - - Type: `Object` + - Type: `object` - Properties: - See [configuration](/configuration#properties) diff --git a/docs/content-v1/fr/1.getting-started/4.fetching.md b/docs/content-v1/fr/1.getting-started/4.fetching.md index 077379d49..83d72a7d3 100644 --- a/docs/content-v1/fr/1.getting-started/4.fetching.md +++ b/docs/content-v1/fr/1.getting-started/4.fetching.md @@ -10,18 +10,18 @@ Ce module injecte globalement une instance de `$content`, ce qui veut dire que v ### $content(path, options?) - `path` - - Type: `String` + - Type: `string` - Défaut: `/` - `requis` - `options` - - Type: `Object` + - Type: `object` - Défaut: `{ deep: false }` - Version: **v1.3.0** - Retourne une séquence de chaîne > Vous pouvez églament passer plusieurs arguments : `$content('articles', params.slug)` sera traduit en `/articles/${params.slug}` -`path` peut désigner un fichier ou un répertoire. Si c'est un fichier, la méthode`fetch()` retournera un `Object`, si c'est un répertoire elle retournera un `Array`. +`path` peut désigner un fichier ou un répertoire. Si c'est un fichier, la méthode`fetch()` retournera un `object`, si c'est un répertoire elle retournera un `Array`. Vous pouvez passer `{ deep: true }` en tant que second argument afin de récupérer les fichiers contenus dans les sous-répertoires. @@ -30,7 +30,7 @@ Toutes les méthodes ci-dessous peuvent être chainées et renvoient une séquen ### only(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `requis` Sélectionne un sous-ensemble de champs. @@ -42,7 +42,7 @@ const { titre } = await this.$content('article-1').only(['titre']).fetch() ### without(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `required` Retire un sous-ensemble de champs. @@ -54,7 +54,7 @@ const { title, ...propsWithoutBody } = await this.$content('article-1').without( ### where(query) - `query` - - Type: `Object` + - Type: `object` - `requis` Filtre les résultats par le biais d'une requête. @@ -86,10 +86,10 @@ Ce module utilise en interne LokiJS, vous pouvez allez voir des [exemples de req ### sortBy(key, direction) - `key` - - Type: `String` + - Type: `string` - `requis` - `direction` - - Type: `String` + - Type: `string` - Valeur: `'asc'` ou `'desc'` - Défaut: `'asc'` @@ -104,7 +104,7 @@ const articles = await this.$content('articles').sortBy('titre').fetch() ### limit(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `requis` Limite le nombre de résultats. @@ -117,7 +117,7 @@ const articles = await this.$content('articles').limit(5).fetch() ### skip(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `requis` Détermine le nombre de résultat à passer. @@ -130,10 +130,10 @@ const articles = await this.$content('articles').skip(5).limit(5).fetch() ### search(field, value) - `field` - - Type: `String` + - Type: `string` - `requis` - `value` - - Type: `String` + - Type: `string` Effectue une recherche plein texte sur un champ. Le paramètre `value` est optionnel, dans ce cas `field` devient la `value`  et la recherche est alors effectuée sur tous les champs définis en tant que champ de recherche plein texte. @@ -153,10 +153,10 @@ const articles = await this.$content('articles').search('').fetch() ### surround(slug, options) - `slug` - - Type: `String` + - Type: `string` - `requis` - `options` - - Type: `Object` + - Type: `object` - Défaut: `{ before: 1, after: 1}` Récupère les résultats qui précédent et suivent un résultat spécifique. @@ -185,7 +185,7 @@ const [prev, next] = await this.$content('articles') ### fetch() -- Renvoie: `Promise` | `Promise` +- Renvoie: `Promise` | `Promise` Met fin à la séquence de chaînes et collecte les données. diff --git a/docs/content-v1/fr/1.getting-started/5.displaying.md b/docs/content-v1/fr/1.getting-started/5.displaying.md index f8b58c490..6306978e1 100644 --- a/docs/content-v1/fr/1.getting-started/5.displaying.md +++ b/docs/content-v1/fr/1.getting-started/5.displaying.md @@ -35,7 +35,7 @@ export default { **Props:** - document: - - Type: `Object` + - Type: `object` - `requis` Vous pouvez en apprendre davantage au sujet de ce que vous pouvez écrire dans vos fichiers Markdown dans la section [écrire du contenu](/fr/writing#markdown). diff --git a/docs/content-v1/fr/1.getting-started/6.configuration.md b/docs/content-v1/fr/1.getting-started/6.configuration.md index 8425ef3e3..b6e410827 100644 --- a/docs/content-v1/fr/1.getting-started/6.configuration.md +++ b/docs/content-v1/fr/1.getting-started/6.configuration.md @@ -19,7 +19,7 @@ Voir les [options par défaut](#configuration-par-défaut). ### `apiPrefix` -- Type: `String` +- Type: `string` - Défaut: `'/_content'` La route qui sera utilisée pour les appels API côté client et les SSE. @@ -33,7 +33,7 @@ content: { ### `dir` -- Type: `String` +- Type: `string` - Défaut: `'content'` Le répertoire utilisé pour l'écriture du contenu. Vous pouvez fournir un chemin absolu, mais dans le cas où le chemin est relatif, il sera déterminé avec la propriété [srcDir](https://nuxtjs.org/api/configuration-srcdir) de Nuxt. @@ -94,7 +94,7 @@ Par défaut, ce module a recours à des plugins pour améliorer la conversion du ### `markdown.externalLinks` -- Type: `Object` +- Type: `object` - Défaut: `{}` Vous pouvez controler le comportement des liens avec cette option. Consultez la liste des options [ici](https://github.com/remarkjs/remark-external-links#api). @@ -112,14 +112,14 @@ content: { ### `markdown.footnotes` -- Type: `Object` +- Type: `object` - Défaut: `{ inlineNotes: true }` Vous pouvez controler le comportement des liens avec cette option. Consultez la liste des [ici](https://github.com/remarkjs/remark-footnotes#remarkusefootnotes-options). ### `markdown.prism.theme` -- Type: `String` +- Type: `string` - Défaut: `'prismjs/themes/prism.css'` Ce module gère la coloration syntaxique du contenu Markdown à l'aide de [PrismJS](https://prismjs.com). @@ -150,7 +150,7 @@ content: { ### `yaml` -- Type: `Object` +- Type: `object` - Défaut: `{}` Ce module utilise `js-yaml` pour convertir les fichiers yaml, vous pouvez consulter les options [ici](https://github.com/nodeca/js-yaml#api). @@ -159,7 +159,7 @@ Notez que nous forçons l'option `json: true`. ### `csv` -- Type: `Object` +- Type: `object` - Défaut: `{}` Ce module utilise `node-csvtojson` pour convertir les fichiers csv, vous pouvez consulter les options [ici](https://github.com/Keyang/node-csvtojson#parameters). diff --git a/docs/content-v1/fr/1.getting-started/7.advanced.md b/docs/content-v1/fr/1.getting-started/7.advanced.md index bde216ab5..f678bb0e1 100644 --- a/docs/content-v1/fr/1.getting-started/7.advanced.md +++ b/docs/content-v1/fr/1.getting-started/7.advanced.md @@ -63,7 +63,7 @@ Vous permez d'ajouter des données à un document avant qu'il ne soit stocké. Arguments: - `document` - - Type: `Object` + - Type: `object` - Propriétés: - Voir [écrire du contenu](/fr/writing) diff --git a/docs/content-v1/ja/1.getting-started/4.fetching.md b/docs/content-v1/ja/1.getting-started/4.fetching.md index 5f42734f1..21d5bb590 100644 --- a/docs/content-v1/ja/1.getting-started/4.fetching.md +++ b/docs/content-v1/ja/1.getting-started/4.fetching.md @@ -10,19 +10,19 @@ description: 'Nuxt.jsプロジェクトで$contentを使って静的コンテン ### $content(path, options?) - `path` - - Type: `String` + - Type: `string` - Default: `/` - `options` - - Type: `Object` + - Type: `object` - Default: `{}` - Version: **>= v1.3.0** - `options.deep` - - Type: `Boolean` + - Type: `boolean` - Default: `false` - Version: **>= v1.3.0** - *サブディレクトリからのファイルの取得* - `options.text` - - Type: `Boolean` + - Type: `boolean` - Default: `false` - Version: **>= v1.4.0** - *元のマークダウンの内容を`text`変数で返します* @@ -30,7 +30,7 @@ description: 'Nuxt.jsプロジェクトで$contentを使って静的コンテン > 引数を複数与えることもできます。`$content('article', params.slug)` は `/articles/${params.slug}` に変換されます。 -`path`にはファイルかディレクトリを指定できます。`path`がファイルの場合、`fetch()` は `Object` を返し、ディレクトリの場合は `Array` を返します。 +`path`にはファイルかディレクトリを指定できます。`path`がファイルの場合、`fetch()` は `object` を返し、ディレクトリの場合は `Array` を返します。 第二引数に `{ deep: true }` を渡すことでサブディレクトリからファイルを取得できます。 @@ -40,7 +40,7 @@ description: 'Nuxt.jsプロジェクトで$contentを使って静的コンテン ### only(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `required` フィールドのサブセットを抽出します。 @@ -52,7 +52,7 @@ const { title } = await this.$content('article-1').only(['title']).fetch() ### without(keys) - `keys` - - Type: `Array` | `String` + - Type: `Array` | `string` - `required` フィールドのサブセットを削除します。 @@ -64,7 +64,7 @@ const { title, ...propsWithoutBody } = await this.$content('article-1').without( ### where(query) - `query` - - Type: `Object` + - Type: `object` - `required` クエリで結果をフィルタリングします。 @@ -96,10 +96,10 @@ const products = await this.$content('products').where({ 'categories.slug': { $c ### sortBy(key, direction) - `key` - - Type: `String` + - Type: `string` - `required` - `direction` - - Type: `String` + - Type: `string` - Value: `'asc'` or `'desc'` - Default: `'asc'` @@ -114,7 +114,7 @@ const articles = await this.$content('articles').sortBy('title').fetch() ### limit(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `required` 結果の数を最大でnまでに制限します。 @@ -127,7 +127,7 @@ const articles = await this.$content('articles').limit(5).fetch() ### skip(n) - `n` - - Type: `String` | `Number` + - Type: `string` | `number` - `required` 結果をnだけスキップします。 @@ -140,10 +140,10 @@ const articles = await this.$content('articles').skip(5).limit(5).fetch() ### search(field, value) - `field` - - Type: `String` + - Type: `string` - `required` - `value` - - Type: `String` + - Type: `string` フィールドの全文検索を行います。`value`はオプションで、この場合は `field` が `value` となり、定義したすべての全文検索フィールドに対して検索が行われます。 @@ -165,10 +165,10 @@ const articles = await this.$content('articles').search('welcome').fetch() ### surround(slug, options) - `slug` - - Type: `String` + - Type: `string` - `required` - `options` - - Type: `Object` + - Type: `object` - Default: `{ before: 1, after: 1}` Get prev and next results around a specific slug. @@ -205,7 +205,7 @@ const [prev, next] = await this.$content('articles') ### fetch() -- Returns: `Promise` | `Promise` +- Returns: `Promise` | `Promise` チェーンシーケンスを終了し、データを収集します。 diff --git a/docs/content-v1/ja/1.getting-started/5.displaying.md b/docs/content-v1/ja/1.getting-started/5.displaying.md index a7afa8812..5a62d521a 100644 --- a/docs/content-v1/ja/1.getting-started/5.displaying.md +++ b/docs/content-v1/ja/1.getting-started/5.displaying.md @@ -35,7 +35,7 @@ export default { **Props:** - document: - - Type: `Object` + - Type: `object` - `required` Markdownファイルに書くことができる内容についての詳細はこちらをご覧ください。[コンテンツを作成する](/ja/writing#markdown) diff --git a/docs/content-v1/ja/1.getting-started/6.configuration.md b/docs/content-v1/ja/1.getting-started/6.configuration.md index 2c2a6c212..9874bcaed 100644 --- a/docs/content-v1/ja/1.getting-started/6.configuration.md +++ b/docs/content-v1/ja/1.getting-started/6.configuration.md @@ -28,7 +28,7 @@ export default { ### `apiPrefix` -- Type: `String` +- Type: `string` - Default: `'/_content'` クライアントサイドのAPI呼び出しやSSE(Server-Sent Events)に利用されるルート @@ -42,7 +42,7 @@ content: { ### `dir` -- Type: `String` +- Type: `string` - Default: `'content'` コンテンツを書くためのディレクトリ。絶対パスを指定できますが、相対パスの場合はNuxt [srcDir](https://nuxtjs.org/api/configuration-srcdir)で解決されます。 @@ -215,7 +215,7 @@ export default { ### `markdown.prism.theme` -- Type: `String` +- Type: `string` - Default: `'prismjs/themes/prism.css'` [PrismJS](https://prismjs.com)を使用してMarkdownコンテンツのコードのシンタックスハイライトを処理します。 @@ -257,7 +257,7 @@ content: { ### `yaml` -- Type: `Object` +- Type: `object` - Default: `{}` このモジュールは、`js-yaml`を使用して`.yaml`と`.yml`ファイルを解析します。ここで[options](https://github.com/nodeca/js-yaml#api)を確認できます。 @@ -266,14 +266,14 @@ content: { ### `xml` -- Type: `Object` +- Type: `object` - Default: `{}` このモジュールは `xml2js` を用いて `.xml` ファイルを解析します。[options](https://www.npmjs.com/package/xml2js#options)はこちらで確認できます。 ### `csv` -- Type: `Object` +- Type: `object` - Default: `{}` このモジュールは、`node-csvtojson`を使用してcsvファイルを解析します。ここで[options](https://github.com/Keyang/node-csvtojson#parameters)を確認できます。 diff --git a/docs/content-v1/ja/1.getting-started/7.advanced.md b/docs/content-v1/ja/1.getting-started/7.advanced.md index 0a3d57f5d..5cc543f96 100644 --- a/docs/content-v1/ja/1.getting-started/7.advanced.md +++ b/docs/content-v1/ja/1.getting-started/7.advanced.md @@ -63,7 +63,7 @@ export default { Arguments: - `document` - - Type: `Object` + - Type: `object` - Properties: - [コンテンツを作成する](/ja/writing)を参照してください。 diff --git a/docs/content-v1/ja/2.examples/2.docs-theme.md b/docs/content-v1/ja/2.examples/2.docs-theme.md index ea8d2af06..c7685fedd 100644 --- a/docs/content-v1/ja/2.examples/2.docs-theme.md +++ b/docs/content-v1/ja/2.examples/2.docs-theme.md @@ -147,26 +147,26 @@ package.json 適切に機能させるには、Markdownのフロントマターに以下のプロパティを必ず含めてください: - `title` - - Type: `String` + - Type: `string` - `required` - *ページのタイトルはメタに挿入されます* - `description` - - Type: `String` + - Type: `string` - `required` - *ページの説明はメタに挿入されます* - `position` - - Type: `Number` + - Type: `number` - `required` - *ナビゲーションでドキュメントをソートするために使用されます* - `category` - - Type: `String` + - Type: `string` - `required` - *ナビゲーションでドキュメントをグループ化するために使用されます* - `version` - - Type: `Float` + - Type: `float` - *ドキュメントが更新されることをバッジでユーザーへ警告するために使用できます。一度ページが表示されると、バージョンが上がるまではローカルストレージに保存されます。* - `fullscreen` - - Type: `Boolean` + - Type: `boolean` - *`toc`がないときにページを拡大するために使用できます* **例** @@ -187,19 +187,19 @@ fullscreen: false テーマの設定をするために、`content/settings.json`を作成できます。 - `title` - - Type: `String` + - Type: `string` - *ドキュメントのタイトル* - `url` - - Type: `String` + - Type: `string` - *ドキュメントがデプロイされるURL* - `logo` - - Type: `String` | `Object` - - *プロジェクトのロゴ。[color mode](https://github.com/nuxt-community/color-mode-module)ごとにロゴを設定する`Object`にもできます* + - Type: `string` | `object` + - *プロジェクトのロゴ。[color mode](https://github.com/nuxt-community/color-mode-module)ごとにロゴを設定する`object`にもできます* - `github` - - Type: `String` + - Type: `string` - *最新バージョン、リリースページ、ページ上部のGitHubへのリンク、 `このページをGitHubで編集する`リンク などを各ページへ表示させるには、GitHubレポジトリを`${org}/${name}`の形式で追加します* - `twitter` - - Type: `String` + - Type: `string` - *リンクさせたいTwitterユーザー名* **例** @@ -226,7 +226,7 @@ fullscreen: false **Props** - `type` - - Type: `String` + - Type: `string` - Default: `'warning'` - Values: `['warning', 'info']` @@ -300,10 +300,10 @@ items: **Props** - `label` - - Type: `String` + - Type: `string` - `required` - `active` - - Type: `Boolean` + - Type: `boolean` - Default: `false` **例** @@ -339,7 +339,7 @@ npm install @nuxt/content-theme-docs **Props** - `src` - - Type: `String` + - Type: `string` - `required` **例** diff --git a/docs/content-v1/ru/1.getting-started/4.fetching.md b/docs/content-v1/ru/1.getting-started/4.fetching.md index 2f2b0c52a..364b00aa7 100644 --- a/docs/content-v1/ru/1.getting-started/4.fetching.md +++ b/docs/content-v1/ru/1.getting-started/4.fetching.md @@ -12,19 +12,19 @@ category: Начало ### $content(путь, параметры?) - `путь` - - Тип: `String` + - Тип: `string` - По умолчанию: `/` - `параметры` - - Тип: `Object` + - Тип: `object` - По умолчанию: `{}` - Версия: **v1.3.0** - `параметры.deep` - - Тип: `Boolean` + - Тип: `boolean` - По умолчанию: `false` - Версия: **v1.3.0** - *Получение файлов из поддиректорий* - `параметры.text` - - Тип: `Boolean` + - Тип: `boolean` - По умолчанию: `false` - Версия: **v2.0.0** - *Возвращает оригинальное содержание markdown в переменной `text`* @@ -32,14 +32,14 @@ category: Начало > Вы можете передать несколько аргументов: `$content('articles', params.slug)` будет преобразовано в `/articles/${params.slug}` -`путь` может быть файлом или директорией. Если `путь` это файл, то `fetch()` вернет `Object`, если директория, то вернет `Array`. +`путь` может быть файлом или директорией. Если `путь` это файл, то `fetch()` вернет `object`, если директория, то вернет `Array`. Все приведенные ниже методы могут быть объединены в цепочку и возвращать последовательность цепочек, кроме `fetch`, который возвращает `Promise`. ### only(ключи) - `ключи` - - Тип: `Array` | `String` + - Тип: `Array` | `string` - `обязательное` Выберите подмножество полей. @@ -51,7 +51,7 @@ const { title } = await this.$content('article-1').only(['title']).fetch() ### without(ключи) - `keys` - - Тип: `Array` | `String` + - Тип: `Array` | `string` - `обязательное` Исключите подмножество полей. @@ -63,7 +63,7 @@ const { title, ...propsWithoutBody } = await this.$content('article-1').without( ### where(запрос) - `запрос` - - Тип: `Object` + - Тип: `object` - `обязательное` Отфильтровывает результаты по запросу. @@ -95,10 +95,10 @@ const products = await this.$content('products').where({ 'categories.slug': { $c ### sortBy(ключ, направление) - `ключ` - - Тип: `String` + - Тип: `string` - `обязательное` - `направление` - - Тип: `String` + - Тип: `string` - Значение: `'asc'` или `'desc'` - По умолчанию: `'asc'` @@ -113,7 +113,7 @@ const articles = await this.$content('articles').sortBy('title').fetch() ### limit(кол-во) - `кол-во` - - Тип: `String` | `Number` + - Тип: `string` | `number` - `обязательное` Ограничивает количество результатов. @@ -126,7 +126,7 @@ const articles = await this.$content('articles').limit(5).fetch() ### skip(кол-во) - `кол-во` - - Тип: `String` | `Number` + - Тип: `string` | `number` - `обязательное` Пропускает нужное количество результатов. @@ -139,10 +139,10 @@ const articles = await this.$content('articles').skip(5).limit(5).fetch() ### search(поле, значение) - `поле` - - Тип: `String` + - Тип: `string` - `обязательное` - `значение` - - Тип: `String` + - Тип: `string` Выполняет полнотекстовый поиск по полю. `значение` необязательное, в этом случае `поле` является `значением` и поиск будет выполняться по всем определенным полнотекстовым полям поиска. @@ -165,10 +165,10 @@ const articles = await this.$content('articles').search('welcome').fetch() ### surround(ярлык, настройки) - `ярлык` - - Тип: `String` + - Тип: `string` - `обязательное` - `настройки` - - Тип: `Object` + - Тип: `object` - По умолчанию: `{ before: 1, after: 1}` Получает предыдущий и следующий результаты по конкретному ярлыку. @@ -201,7 +201,7 @@ const [prev, next] = await this.$content('articles') ### fetch() -- Возвращает: `Promise` | `Promise` +- Возвращает: `Promise` | `Promise` Завершает последовательность цепочек и собирает данные. diff --git a/docs/content-v1/ru/1.getting-started/5.displaying.md b/docs/content-v1/ru/1.getting-started/5.displaying.md index 115475a3e..a18728911 100644 --- a/docs/content-v1/ru/1.getting-started/5.displaying.md +++ b/docs/content-v1/ru/1.getting-started/5.displaying.md @@ -37,7 +37,7 @@ export default { **Входные параметры:** - document: - - Тип: `Object` + - Тип: `object` - `обязательное` Изучите больше о том, что вы можете писать в вашем markdown файле в разделе [написание контента](/writing#markdown). diff --git a/docs/content-v1/ru/1.getting-started/6.configuration.md b/docs/content-v1/ru/1.getting-started/6.configuration.md index eaec56e10..296522303 100644 --- a/docs/content-v1/ru/1.getting-started/6.configuration.md +++ b/docs/content-v1/ru/1.getting-started/6.configuration.md @@ -29,7 +29,7 @@ export default { ### `apiPrefix` -- Тип: `String` +- Тип: `string` - По умолчанию: `'/_content'` Маршрут, использующийся для клиентских API вызовов и SSE(Server-Sent Events — «события, посылаемые сервером»). @@ -43,7 +43,7 @@ content: { ### `dir` -- Тип: `String` +- Тип: `string` - По умолчанию: `'content'` Директория, используемая для написания контента. @@ -85,7 +85,7 @@ content: { ``` ### `liveEdit` -- Тип `Boolean` +- Тип `boolean` - По умолчанию: `true` - Версия: **>= v1.5.0** @@ -229,7 +229,7 @@ export default { ### `markdown.prism.theme` -- Тип: `String` +- Тип: `string` - По умолчанию: `'prismjs/themes/prism.css'` Этот модуль добавляет подсветку синтаксиса кода в markdown используя [PrismJS](https://prismjs.com). @@ -274,7 +274,7 @@ content: { ### `yaml` -- Тип: `Object` +- Тип: `object` - По умолчанию: `{}` Этот модуль использует `js-yaml` для чтения yaml файлов, вы можете посмотреть список настроек [здесь](https://github.com/nodeca/js-yaml#api). @@ -283,21 +283,21 @@ content: { ### `xml` -- Тип: `Object` +- Тип: `object` - По умолчанию: `{}` Этот модуль использует `xml2js` для чтения `.xml` файлов, вы можете посмотреть список настроек [здесь](https://www.npmjs.com/package/xml2js#options). ### `csv` -- Тип: `Object` +- Тип: `object` - По умолчанию: `{}` Этот модуль использует `node-csvtojson` для чтения csv файлов, вы можете посмотреть список настроек [здесь](https://github.com/Keyang/node-csvtojson#parameters). ### `extendParser` -- Тип: `Object` +- Тип: `object` - По умолчанию `{}` С этим параметром вы можете задать собственные парсеры для различных типов файлов. Также вы можете **перезаписать** стандартный парсер! diff --git a/docs/content-v1/ru/1.getting-started/7.advanced.md b/docs/content-v1/ru/1.getting-started/7.advanced.md index 84fca686a..caf85ba7d 100644 --- a/docs/content-v1/ru/1.getting-started/7.advanced.md +++ b/docs/content-v1/ru/1.getting-started/7.advanced.md @@ -70,7 +70,7 @@ export default { Аргументы: - `document` - - Тип: `Object` + - Тип: `object` - Свойства: - Смотрите [написание контента](/writing) diff --git a/docs/content/3.guide/1.writing/2.markdown.md b/docs/content/3.guide/1.writing/2.markdown.md index 9ea349ba6..1216a1b8e 100755 --- a/docs/content/3.guide/1.writing/2.markdown.md +++ b/docs/content/3.guide/1.writing/2.markdown.md @@ -59,13 +59,13 @@ description: 'meta description of the page' ### Native parameters -| Key | Type | Default | Description | -| ------------------------------------------- | --------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| Key | Type | Default | Description | +| ------------------------------------------- | :-------: | ------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `title` | `string` | First `

`{lang="html"} of the page | Title of the page, will also be injected in metas | | `description` | `string` | First `

`{lang="html"} of the page | Description of the page, will be shown below the title and injected into the metas | -| `draft` | `Boolean` | `false` | Mark the page as draft (and only display it in development mode). | -| `navigation` | `Boolean` | `true` | Define if the page is included in [`fetchContentNavigation`](/guide/displaying/navigation) return value. | -| [`head`](/api/composables/use-content-head) | `Object` | `true` | Easy access to [`useContentHead`](/api/composables/use-content-head) | +| `draft` | `boolean` | `false` | Mark the page as draft (and only display it in development mode). | +| `navigation` | `boolean` | `true` | Define if the page is included in [`fetchContentNavigation`](/guide/displaying/navigation) return value. | +| [`head`](/api/composables/use-content-head) | `object` | `true` | Easy access to [`useContentHead`](/api/composables/use-content-head) | When used together with [``](/guide/displaying/rendering#contentdoc-) or the [document-driven mode](/guide/writing/document-driven) to display the current page, the [`useContentHead() composable`](/api/composables/use-content-head) will be used to set the page's metadata. diff --git a/docs/content/4.api/1.components/1.content-doc.md b/docs/content/4.api/1.components/1.content-doc.md index 8c9e15645..d2eb65f99 100644 --- a/docs/content/4.api/1.components/1.content-doc.md +++ b/docs/content/4.api/1.components/1.content-doc.md @@ -11,19 +11,19 @@ It uses ``{lang=html} and ``{lang=html} under the ## Props - `tag`{lang=ts}: The tag to use for the renderer element (if no default slot is provided). - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `'div'`{lang=ts} - `path`{lang=ts}: The path of the content to load from content source. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `$route.path`{lang=ts} - `excerpt`{lang=ts}: Whether or not to render the excerpt. - - Type: `Boolean`{lang=ts} + - Type: `boolean`{lang=ts} - Default: `false`{lang=ts} - `query`{lang=ts}: A query to be passed to `queryContent()`. - Type: `QueryBuilderParams`{lang=ts} - Default: `undefined`{lang=ts} - `head`{lang=ts}: Toggles the usage of [`useContentHead`](/api/composables/use-content-head). - - Type: `Boolean`{lang=ts} + - Type: `boolean`{lang=ts} - Default: `true`{lang=ts} ## Slots diff --git a/docs/content/4.api/1.components/2.content-list.md b/docs/content/4.api/1.components/2.content-list.md index dfdb0c110..fb6b48359 100644 --- a/docs/content/4.api/1.components/2.content-list.md +++ b/docs/content/4.api/1.components/2.content-list.md @@ -11,7 +11,7 @@ An explicit `path`{lang=ts} can be given to the component. ## Props - `path`{lang=ts}: The path of the content to load from content source. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `'/'`{lang=ts} - `query`{lang=ts}: A query builder params object to be passed to `` component. - Type: `QueryBuilderParams`{lang=ts} diff --git a/docs/content/4.api/1.components/2.content-renderer.md b/docs/content/4.api/1.components/2.content-renderer.md index 3bc424ef3..f2abd252f 100644 --- a/docs/content/4.api/1.components/2.content-renderer.md +++ b/docs/content/4.api/1.components/2.content-renderer.md @@ -14,13 +14,13 @@ Other types will currently be passed to default slot via `v-slot="{ data }"` or - Type: `ParsedContent`{lang=ts} - Default: `{}`{lang=ts} - `tag`{lang=ts}: The tag to use for the renderer element if it is used. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `'div'`{lang=ts} - `excerpt`{lang=ts}: Whether or not to render the excerpt. - - Type: `Boolean`{lang=ts} + - Type: `boolean`{lang=ts} - Default: `false`{lang=ts} - `components`{lang=ts}: The map of custom components to use for rendering. This prop will pass to markdown renderer and will not affect other file types. - - Type: `Object`{lang=ts} + - Type: `object`{lang=ts} - Default: `{}`{lang=ts} ## Slots diff --git a/docs/content/4.api/1.components/4.content-query.md b/docs/content/4.api/1.components/4.content-query.md index 3e9c19e5c..bf57200db 100644 --- a/docs/content/4.api/1.components/4.content-query.md +++ b/docs/content/4.api/1.components/4.content-query.md @@ -7,13 +7,13 @@ The ``{lang=html} component fetches a document and gives access to ## Props - `path`{lang=ts}: The path of the content to load from content source. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `undefined`{lang=ts} - `only`{lang=ts}: Select a subset of fields from an array of keys. - - Type: `Array`{lang=ts} + - Type: `string[]`{lang=ts} - Default: `undefined`{lang=ts} - `without`{lang=ts}: Remove a subset of fields from an array of keys. - - Type: `Array`{lang=ts} + - Type: `string[]`{lang=ts} - Default: `undefined`{lang=ts} - `where`{lang=ts}: Filter results with a `where` clause definition. - Type: `{ [key: string]: any }`{lang=ts} @@ -22,16 +22,16 @@ The ``{lang=html} component fetches a document and gives access to - Type: `SortParams`{lang=ts} - Default: `undefined`{lang=ts} - `limit`{lang=ts}: Limit the amount of results. - - Type: `Number`{lang=ts} + - Type: `number`{lang=ts} - Default: `undefined`{lang=ts} - `skip`{lang=ts}: Skip an amount of results. - - Type: `Number`{lang=ts} + - Type: `number`{lang=ts} - Default: `undefined`{lang=ts} - `locale`{lang=ts}: Filter contents based on a locale. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Default: `undefined`{lang=ts} - `find`{lang=ts}: The type of query to be made. - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - Values: `'one'`{lang=ts} or `'surround'`{lang=ts} or `undefined`{lang=ts} - Default: `.find()`{lang=ts} will be used if nothing is specified diff --git a/docs/content/4.api/1.components/5.markdown.md b/docs/content/4.api/1.components/5.markdown.md index ab855849d..c8bd812ec 100644 --- a/docs/content/4.api/1.components/5.markdown.md +++ b/docs/content/4.api/1.components/5.markdown.md @@ -16,7 +16,7 @@ It is useful when creating components that you want to use in your Markdown cont - Type: Vue slot `Function` - Example: `$slots.default`{lang=ts} - `unwrap`{lang=ts}: Whether to unwrap the content or not. This is useful when you want to extract the content nested in native Markdown syntax. Each specified tag will get removed from AST. - - Type: `Boolean`{lang=ts} or `String`{lang=ts} + - Type: `boolean`{lang=ts} or `string`{lang=ts} - Default: `false`{lang=ts} - Example: `'ul li'`{lang=ts} diff --git a/docs/content/4.api/1.components/6.content-slot.md b/docs/content/4.api/1.components/6.content-slot.md index 298ac921c..b57206630 100644 --- a/docs/content/4.api/1.components/6.content-slot.md +++ b/docs/content/4.api/1.components/6.content-slot.md @@ -12,7 +12,7 @@ It is useful when creating components that you want to use in your Markdown cont - Type: Vue slot `Function` - Example: `$slots.default`{lang=ts} - `unwrap`{lang=ts}: Whether to unwrap the content or not. This is useful when you want to extract the content nested in native Markdown syntax. Each specified tag will get removed from AST. - - Type: `Boolean`{lang=ts} or `String`{lang=ts} + - Type: `boolean`{lang=ts} or `string`{lang=ts} - Default: `false`{lang=ts} - Example: `'ul li'`{lang=ts} diff --git a/docs/content/4.api/2.composables/1.query-content.md b/docs/content/4.api/2.composables/1.query-content.md index 7d3a3dacb..afb94f408 100644 --- a/docs/content/4.api/2.composables/1.query-content.md +++ b/docs/content/4.api/2.composables/1.query-content.md @@ -96,7 +96,7 @@ These options are given to [Intl.Collator()](https://developer.mozilla.org/en-US ## `limit(count)` - `count`{lang="ts"} - - Type: `Number`{lang="ts"} + - Type: `number`{lang="ts"} - **Required** Limit number of results. @@ -109,7 +109,7 @@ const articles = await queryContent('articles').limit(5).find() ## `skip(count)` - `count`{lang=ts} - - Type: `Number`{lang=ts} + - Type: `number`{lang=ts} - **Required** Skip results. @@ -125,7 +125,7 @@ const articles = await queryContent('articles') ## `without(keys)` - `keys`{lang=ts} - - Type: `Array`{lang=ts} or `String`{lang=ts} + - Type: `string[]`{lang=ts} or `string`{lang=ts} - **Required** Remove a subset of fields. @@ -139,7 +139,7 @@ const articles = await queryContent('articles').without(['unused-key', 'another- ## `only(keys)` - `keys`{lang=ts} - - Type: `Array`{lang=ts} or `String`{lang=ts} + - Type: `string[]`{lang=ts} or `string`{lang=ts} - **Required** Select a subset of fields. @@ -170,7 +170,7 @@ const firstArticle = await queryContent('articles').findOne() ## `findSurround(path, options)` - `path`{lang=ts} - - Type: `String`{lang=ts} + - Type: `string`{lang=ts} - **Required** - `options`{lang=ts} - Type: `{ before: number, after: number }`{lang=ts} diff --git a/docs/content/4.api/2.composables/6.use-content-head.md b/docs/content/4.api/2.composables/6.use-content-head.md index 8202f148d..a47418528 100644 --- a/docs/content/4.api/2.composables/6.use-content-head.md +++ b/docs/content/4.api/2.composables/6.use-content-head.md @@ -11,17 +11,17 @@ It is already implemented for you in both [``](/api/components/con These parameters can be used from the [Front-Matter](/guide/writing/markdown#front-matter) section of your pages. | Key | Type | Default | Description | -| ------------------ | ------------------ | -------------------- | ------------------------------------------------------------------------------------------------ | -| `head` | `Object` | | A [useHead](https://nuxt.com/docs/api/composables/use-head) compatible object | -| `title` | `String` | | Will be used as the default value for `head.title` | -| `head.title` | `String` | Parsed `title` | Sets the `` tag | -| `description` | `String` | | Will be used as the default value for `head.description` | -| `head.description` | `String` | Parsed `description` | Sets the `<meta name="description">` tag | -| `image` | `String \| Object` | | Will be used as the default value for `head.image` | -| `image.src` | `String` | | The source of the image | -| `image.alt` | `String` | | The alt description of the image | -| `image.xxx` | `String` | | Any [`og:image:xxx` compatible](https://ogp.me/#structured) attribute | -| `head.image` | `String \| Object` | | Overrides the `<meta property="og:image">` | +| ------------------ | :----------------: | -------------------- | ------------------------------------------------------------------------------------------------ | +| `head` | `object` | | A [useHead](https://nuxt.com/docs/api/composables/use-head) compatible object | +| `title` | `string` | | Will be used as the default value for `head.title` | +| `head.title` | `string` | Parsed `title` | Sets the `<title>` tag | +| `description` | `string` | | Will be used as the default value for `head.description` | +| `head.description` | `string` | Parsed `description` | Sets the `<meta name="description">` tag | +| `image` | `string \| object` | | Will be used as the default value for `head.image` | +| `image.src` | `string` | | The source of the image | +| `image.alt` | `string` | | The alt description of the image | +| `image.xxx` | `string` | | Any [`og:image:xxx` compatible](https://ogp.me/#structured) attribute | +| `head.image` | `string \| object` | | Overrides the `<meta property="og:image">` | At the exception of `title`, `description` and `image`, the `head` object behaves exactly the same in [Front-Matter](/guide/writing/markdown#front-matter) as it would in [`useHead({ ... })`](https://nuxt.com/docs/api/composables/use-head) composable. diff --git a/docs/content/4.api/3.configuration.md b/docs/content/4.api/3.configuration.md index b377803dc..f9c075426 100644 --- a/docs/content/4.api/3.configuration.md +++ b/docs/content/4.api/3.configuration.md @@ -16,7 +16,7 @@ export default defineNuxtConfig({ ## `api` -- Type: `Record<String, any>`{lang=ts} +- Type: `Record<string, any>`{lang=ts} - Default: `{ baseURL: '/api/_content' }`{lang=ts} Change default behaviour of Content APIs. @@ -35,7 +35,7 @@ export default defineNuxtConfig({ ## `watch` -- Type: `Object | false`{lang=ts} +- Type: `object | false`{lang=ts} - Default: `{ port: 4000, showUrl: true }`{lang=ts} Disable content watcher and hot content reload. @@ -74,7 +74,7 @@ export default defineNuxtConfig({ ## `sources` -- Type: `Record<String, Object>`{lang=ts} +- Type: `Record<string, object>`{lang=ts} - Default: `{}`{lang=ts} Define different sources for contents. @@ -184,14 +184,14 @@ When adding a new plugin, make sure to install it in your dependencies. ### `mdc` -- Type: `Boolean`{lang=ts} +- Type: `boolean`{lang=ts} - Default: `true`{lang=ts} Whether MDC syntax should be supported or not. ### `toc` -- Type: `Object`{lang=ts} +- Type: `object`{lang=ts} - Default: `{ depth: 2, searchDepth: 2 }`{lang="ts"} Control behavior of Table of Contents generation. @@ -201,7 +201,7 @@ Control behavior of Table of Contents generation. ### `tags` -- Type: `Object`{lang=ts} +- Type: `object`{lang=ts} Tags will be used to replace markdown components and render custom components instead of default ones. @@ -219,7 +219,7 @@ export default defineNuxtConfig({ ### `anchorLinks` -- Type: `Boolean | Object`{lang=ts} +- Type: `boolean | object`{lang=ts} - Default: `{depth: 4, exclude: [1]}`{lang=ts} By default, the Content module generates anchor links for `h2`, `h3` and `h4` headings. Using this option, you can control link generation. @@ -237,7 +237,7 @@ By default, the Content module generates anchor links for `h2`, `h3` and `h4` he ## `highlight` -- Type: `false | Object`{lang=ts} +- Type: `false | object`{lang=ts} Nuxt Content uses [Shiki](https://github.com/shikijs/shiki) to provide syntax highlighting for [`ProseCode`](/api/components/prose#prosecode) and [`ProseCodeInline`](/api/components/prose#prosecodeinline). @@ -328,14 +328,14 @@ Read more about adding languages in the [Shiki documentation](https://github.com ## `yaml` -- Type: `false | Object`{lang=ts} +- Type: `false | object`{lang=ts} - Default: `{}`{lang=ts} Options for yaml parser. ## `navigation` -- Type: `false or Object`{lang=ts} +- Type: `false | object`{lang=ts} - Default: `true`{lang=ts} Configure the navigation feature. @@ -350,14 +350,14 @@ Can be set to `false` to disable the feature completely. ## `locales` -- Type: `Array<String>`{lang=ts} +- Type: `string[]`{lang=ts} - Default: `[]`{lang=ts} List of locale codes. This codes will be used to detect contents locale. ## `defaultLocale` -- Type: `String`{lang=ts} +- Type: `string`{lang=ts} - Default: `undefined`{lang=ts} Default locale for top level contents. Module will use first locale code from `locales` array if this option is not defined. @@ -368,7 +368,7 @@ Note that in case of defining multiple locales, Module will filter content with ## `documentDriven` -- Type: `Boolean | Object`{lang=ts} +- Type: `boolean | object`{lang=ts} - Default: `false`{lang=ts} Toggles the document-driven mode. @@ -403,10 +403,10 @@ Toggles the document-driven mode. | Option | Type | Description | | ----------------- | :-----------------: | :------------------------------------------------------------- | -| `page` | `Boolean` | Enables the page binding, making it globally accessible. | -| `navigation` | `Boolean` | Enables the navigation binding, making it globally accessible. | -| `surround` | `Boolean` | Enables the surround binding, making it globally accessible. | -| `globals` | `Object \| Boolean` | A list of globals to be made available globally. | +| `page` | `boolean` | Enables the page binding, making it globally accessible. | +| `navigation` | `boolean` | Enables the navigation binding, making it globally accessible. | +| `surround` | `boolean` | Enables the surround binding, making it globally accessible. | +| `globals` | `object \| boolean` | A list of globals to be made available globally. | | `layoutFallbacks` | `string[]` | A list of `globals` key to use to find a layout fallback. | | `injectPage` | `boolean` | Inject `[...slug].vue` pre-configured page | | `trailingSlash` | `boolean` | Add a slash at the end of `canonical` and `og:url` | diff --git a/docs/content/4.api/4.advanced.md b/docs/content/4.api/4.advanced.md index 934e809f6..234599a4f 100644 --- a/docs/content/4.api/4.advanced.md +++ b/docs/content/4.api/4.advanced.md @@ -27,10 +27,10 @@ Allows you to modify the contents of a file before it is handled by the parsers. Arguments: - file - - Type: `Object` + - Type: `object` - Properties: - - _id: `String` - - body: `String` + - _id: `string` + - body: `string` ### Example @@ -60,7 +60,7 @@ import { visit } from 'unist-util-visit' export default defineNitroPlugin((nitroApp) => { nitroApp.hooks.hook('content:file:afterParse', (file) => { if (file._id.endsWith('.md')) { - visit(file.body, (n:any) => n.tag === 'img', (node) => { + visit(file.body, (n: any) => n.tag === 'img', (node) => { file.coverImage = node.props.src }) }