Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6 #2031

Merged
merged 30 commits into from
Apr 20, 2023
Merged

v2.6 #2031

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
049c356
fix: revert navDirFromPath behavior
Atinux Mar 8, 2023
dd50fe9
chore(release): release v2.5.2
Atinux Mar 8, 2023
bc32933
docs: add Nuxt Studio link
Atinux Mar 9, 2023
0812bda
docs: fix link to nitro plugins (#1969)
nobkd Mar 20, 2023
38f76c6
fix(type): content locale (#1965)
Virenbar Mar 21, 2023
884f5d8
fix(markdown): html ids in markdown headings should not start with a …
electrolinux Mar 21, 2023
4dd4cb9
fix(useContentHead): set `property` instead of `name` for OG metadata…
tmlmt Mar 28, 2023
1823c0d
docs: format docs & update links & fix mistakes (#1982)
nobkd Apr 12, 2023
7bb8b10
feat(CodeBlock): add line number attribute to code block lines (#1973)
nobkd Apr 12, 2023
bd1cbb4
fix: access config from `public` key (#2005)
danielroe Apr 13, 2023
c605a93
chore(deps): update pnpm to v8 (#1983)
renovate[bot] Apr 13, 2023
25bd7fc
chore(deps): update dependency consola to v3 (#1999)
renovate[bot] Apr 13, 2023
e90f368
chore(deps): update all non-major dependencies (#1954)
renovate[bot] Apr 13, 2023
1456bd2
chore(deps): lock file maintenance (#1962)
renovate[bot] Apr 13, 2023
bdeee97
chore(deps): update all non-major dependencies (#2006)
renovate[bot] Apr 17, 2023
212a06f
chore(deps): lock file maintenance (#2016)
renovate[bot] Apr 17, 2023
c12c707
fix(ContentRendererMarkdown): prevent `undefiend` error on component …
farnabaz Apr 17, 2023
e946c42
fix(code-block): use span with `\n` instead of div for lines (#2008)
nobkd Apr 17, 2023
5599f27
fix(preview): use `sessionStorage` to keep token (#2020)
farnabaz Apr 18, 2023
7541f03
chore(deps): update pnpm to v8.3.0 (#2023)
renovate[bot] Apr 18, 2023
46f3d79
fix(shiki): add `\n` to empty lines
farnabaz Apr 18, 2023
e46309f
fix(markdown-renderer): document reactivity
farnabaz Apr 18, 2023
9d8478d
docs: fix template syntax
farnabaz Apr 18, 2023
90d1598
chore(deps): update dependency consola to ^3.1.0 (#2024)
renovate[bot] Apr 19, 2023
12d5a21
feat: more flexible ignores configuration (#2022)
davestewart Apr 19, 2023
2250d2d
fix(query): prevent adding duplicate conditions to query (#2027)
farnabaz Apr 19, 2023
1a44364
chore(deps): update pnpm to v8.3.1 (#2029)
renovate[bot] Apr 19, 2023
05dc079
fix(document-driven): ensure layout is set on hydration (#2032)
farnabaz Apr 19, 2023
d48394a
chore(deps): update dependency ohash to ^1.1.1 (#2030)
renovate[bot] Apr 20, 2023
bc60a54
chore(release): release v2.6.0
farnabaz Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
# Changelog


## v2.6.0

[compare changes](https://github.com/nuxt/content/compare/v2.5.2...v2.6.0)


### 🚀 Enhancements

- **CodeBlock:** Add line number attribute to code block lines ([#1973](https://github.com/nuxt/content/pull/1973))
- More flexible ignores configuration ([#2022](https://github.com/nuxt/content/pull/2022))

### 🩹 Fixes

- **type:** Content locale ([#1965](https://github.com/nuxt/content/pull/1965))
- **markdown:** Html ids in markdown headings should not start with a digit ([#1961](https://github.com/nuxt/content/pull/1961))
- **useContentHead:** Set `property` instead of `name` for OG metadata ([#1981](https://github.com/nuxt/content/pull/1981))
- Access config from `public` key ([#2005](https://github.com/nuxt/content/pull/2005))
- **ContentRendererMarkdown:** Prevent `undefiend` error on component resolve ([#2021](https://github.com/nuxt/content/pull/2021))
- **code-block:** Use span with `\n` instead of div for lines ([#2008](https://github.com/nuxt/content/pull/2008))
- **preview:** Use `sessionStorage` to keep token ([#2020](https://github.com/nuxt/content/pull/2020))
- **shiki:** Add `\n` to empty lines ([46f3d79f](https://github.com/nuxt/content/commit/46f3d79f))
- **markdown-renderer:** Document reactivity ([e46309fe](https://github.com/nuxt/content/commit/e46309fe))
- **query:** Prevent adding duplicate conditions to query ([#2027](https://github.com/nuxt/content/pull/2027))
- **document-driven:** Ensure layout is set on hydration ([#2032](https://github.com/nuxt/content/pull/2032))

### 📖 Documentation

- Add Nuxt Studio link ([bc329334](https://github.com/nuxt/content/commit/bc329334))
- Fix link to nitro plugins ([#1969](https://github.com/nuxt/content/pull/1969))
- Format docs & update links & fix mistakes ([#1982](https://github.com/nuxt/content/pull/1982))
- Fix template syntax ([9d8478de](https://github.com/nuxt/content/commit/9d8478de))

### ❤️ Contributors

- Farnabaz <farnabaz@gmail.com>
- Dave Stewart <info@davestewart.co.uk>
- Nobkd
- Daniel Roe <daniel@roe.dev>
- Thomas Lamant
- Electrolinux <electrolinux@gmail.com>
- Artyom
- Sébastien Chopin <seb@nuxtjs.com>

## v2.5.2

[compare changes](https://github.com/nuxt/content/compare/v2.5.1...v2.5.2)


### 🩹 Fixes

- Revert navDirFromPath behavior ([049c356d](https://github.com/nuxt/content/commit/049c356d))

### ❤️ Contributors

- Sébastien Chopin ([@Atinux](http://github.com/Atinux))

## v2.5.1

[compare changes](https://github.com/nuxt/content/compare/v2.5.0...v2.5.1)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Nuxt Content reads the `content/` directory in your project, parses `.md`, `.yml
- [📖 &nbsp;Read the documentation](https://content.nuxtjs.org)
- [👾 &nbsp;Playground](https://stackblitz.com/github/nuxt/content/tree/main/examples/essentials/hello-world?file=app.vue)
- [✨ &nbsp;Intro video](https://www.youtube.com/watch?v=o9e12WbKrd8)
- [✍️ &nbsp;Nuxt Studio](https://nuxt.studio)

## Features

Expand Down
12 changes: 6 additions & 6 deletions docs/content-v1/en/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: 'Install @nuxt/content in only two steps in your Nuxt project.'
Add `@nuxt/content` dependency to your project:

::code-group
```bash [Yarn]
yarn add @nuxt/content@^1
```
```bash [Yarn]
yarn add @nuxt/content@^1
```

```bash [NPM]
npm install @nuxt/content@^1
```
```bash [NPM]
npm install @nuxt/content@^1
```
::

Then, add `@nuxt/content` to the `modules` section of `nuxt.config.js`:
Expand Down
2 changes: 1 addition & 1 deletion docs/content-v1/en/1.getting-started/3.writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Description property will contain the excerpt content unless defined within the

<alert type="info">

Be careful to enter <code>&lt;!--more--&gt;</code> exactly; i.e., all lowercase and with no whitespace.
Be careful to enter `<!--more-->` exactly; i.e., all lowercase and with no whitespace.

</alert>

Expand Down
24 changes: 12 additions & 12 deletions docs/content-v1/en/1.getting-started/6.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ When adding a new plugin, make sure to install it in your dependencies:
::

::code-group
```bash [Yarn]
yarn add remark-emoji
```
```bash [Yarn]
yarn add remark-emoji
```

```bash [NPM]
npm install remark-emoji
```
```bash [NPM]
npm install remark-emoji
```
::

```js [nuxt.config.js]
Expand Down Expand Up @@ -246,13 +246,13 @@ This module handles code highlighting in markdown content using [PrismJS](https:
It automatically pushes the desired PrismJS theme in your Nuxt.js config, so if you want to use a different theme than the default one, for example [prism-themes](https://github.com/PrismJS/prism-themes):

::code-group
```bash [Yarn]
yarn add prism-themes
```
```bash [Yarn]
yarn add prism-themes
```

```bash [NPM]
npm install prism-themes
```
```bash [NPM]
npm install prism-themes
```
::

```js [nuxt.config.js]
Expand Down
3 changes: 1 addition & 2 deletions docs/content-v1/en/2.examples/1.basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ description: 'Live example of basic usage of Nuxt Content on CodeSandbox.'
toc: false
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-playground-l164h?hidenavigation=1&theme=dark"}
::
:sandbox{src="https://codesandbox.io/embed/nuxt-content-playground-l164h?hidenavigation=1&theme=dark"}
3 changes: 1 addition & 2 deletions docs/content-v1/en/2.examples/2.tailwindcss-typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ description: 'Live example of Nuxt Content with TailwindCSS Typography plugin on
toc: false
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-tailwindcss-typography-xq04z?hidenavigation=1&theme=dark"}
::
:sandbox{src="https://codesandbox.io/embed/nuxt-content-tailwindcss-typography-xq04z?hidenavigation=1&theme=dark"}
3 changes: 1 addition & 2 deletions docs/content-v1/en/2.examples/3.docs-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ description: 'Live example of Nuxt Content docs theme on CodeSandbox.'
toc: false
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-docs-theme-playground-inwxb?hidenavigation=1&theme=dark"}
::
:sandbox{src="https://codesandbox.io/embed/nuxt-content-docs-theme-playground-inwxb?hidenavigation=1&theme=dark"}
4 changes: 2 additions & 2 deletions docs/content-v1/en/3.community/2.integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ export default {

You can integrate Nuxt Content with [Forestry](https://forestry.io) in a few steps.

<alert>
<alert type="info">

We recommend to take a look at this tutorial made by [Pascal Cauhépé](https://twitter.com/eQRoeil)

<br>
👉 &nbsp;https://nuxt-content-and-forestry.netlify.app

</alert>
2 changes: 1 addition & 1 deletion docs/content-v1/fr/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Utilisez `$content()` sur un répertoire afin de lister, filtrer et rechercher d

## Essayer sur CodeSandbox

::sandbox{src="https://codesandbox.io/embed/nuxt-content-l164h?hidenavigation=1&theme=dark"}
:sandbox{src="https://codesandbox.io/embed/nuxt-content-l164h?hidenavigation=1&theme=dark"}
12 changes: 6 additions & 6 deletions docs/content-v1/fr/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: 'Intégrez @nuxt/content au sein de votre projet Nuxt en seulement
Ajoutez `@nuxt/content` en tant que dépendence à votre projet:

::code-group
```bash [Yarn]
yarn add @nuxt/content
```
```bash [Yarn]
yarn add @nuxt/content
```

```bash [NPM]
npm install @nuxt/content
```
```bash [NPM]
npm install @nuxt/content
```
::

Ensuite, ajoutez `@nuxt/content` au sein de la section `modules` de votre fichier `nuxt.config.js`:
Expand Down
6 changes: 2 additions & 4 deletions docs/content-v1/fr/1.getting-started/3.writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ Quantité totale de contenu au-delà du plus diviseur.
La propriété Description contiendra le contenu de l'extrait à moins qu'elle ne soit définie dans les accessoires Front Matter.

::alert{type="info"}

Veillez à saisir exactement <code>&lt;!--more--&gt;</code>; c'est-à-dire, tout en minuscules et sans espace.

::alert
Veillez à saisir exactement `<!--more-->`; c'est-à-dire, tout en minuscules et sans espace.
::

Des exemples de variables seront injectés dans le document:

Expand Down
10 changes: 1 addition & 9 deletions docs/content-v1/fr/1.getting-started/7.advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ description: Apprenez l'utilisation avancée du module @nuxt/content

`$content` est accessible depuis **@nuxt/content**.

::alert

::alert{type="info"}
Notez que vous ne pouvez y accéder seulement **après que le module ait été chargé** par Nuxt. L'utilisation de `require(@nuxt/content)` devrait avoir lieu dans les hooks ou les méthodes internes de Nuxt.

::

```js
Expand All @@ -31,9 +29,7 @@ export default {
### Génération de Site Statique

::alert{type="info"}

Si vous utilisez Nuxt 2.13+, la commande `nuxt export` a une fonctionnalité de crawler intégrée, donc vous ne devriez pas avoir besoin de recourir à `generate.routes`.

::

Lors de l'utilisation de `nuxt generate`, vous devez spécifier les routes dynamiques avec `generate.routes`, car Nuxt ne sait pas quelles seront ces routes donc il ne sera pas capable de les générer.
Expand Down Expand Up @@ -97,9 +93,7 @@ export default {
## Gérer le Rechargement à Chaud

::alert{type="info"}

Lorsque vous développez, ce module appellera automatiquement l'action `nuxtServerInit` (si elle est définie) et `$nuxt.refresh()` afin de rafraîchir la page actuelle.

::

Dans le cas où vous souhaiteriez écouter cet évènement et ajouter des instructions supplémentaires, vous pouvez écouter l'évènement `content:update` côté client en utilisant `$nuxt.$on('content:update')`:
Expand Down Expand Up @@ -135,9 +129,7 @@ Dès lors que vous opèrerez un changement sur un des fichiers au sein du réper
Dans le cas d'articles, le contenu peut être utilisé pour générer des fils d'actualités en utilisant le module [@nuxtjs/feed](https://github.com/nuxt-community/feed-module).

::alert{type="info"}

Pour utiliser `$content` au sein de l'option `feed`, vous devez ajouter `@nuxt/content` avant `@nuxtjs/feed` dans la propriété `modules`.

::

**Exemple**
Expand Down
3 changes: 1 addition & 2 deletions docs/content-v1/fr/2.examples/1.basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ description: "Exemple en direct d'utilisation de base de Nuxt Content sur CodeSa
toc: false
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-playground-l164h?hidenavigation=1&theme=dark"}
::
:sandbox{src="https://codesandbox.io/embed/nuxt-content-playground-l164h?hidenavigation=1&theme=dark"}
2 changes: 1 addition & 1 deletion docs/content-v1/fr/2.examples/2..tailwindcss-typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: 'Exemple en direct de contenu Nuxt avec le plugin TailwindCSS Typog
toc: true
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-tailwindcss-typography-twhtf?hidenavigation=1&theme=dark"}
:sandbox{src="https://codesandbox.io/embed/nuxt-content-tailwindcss-typography-twhtf?hidenavigation=1&theme=dark"}
3 changes: 1 addition & 2 deletions docs/content-v1/fr/2.examples/3.docs-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ description: 'Exemple en direct du thème de la documentation Nuxt Content sur C
toc: true
---

::sandbox{src="https://codesandbox.io/embed/nuxt-content-docs-theme-playground-inwxb?hidenavigation=1&theme=dark"}
::
:sandbox{src="https://codesandbox.io/embed/nuxt-content-docs-theme-playground-inwxb?hidenavigation=1&theme=dark"}
8 changes: 2 additions & 6 deletions docs/content-v1/fr/3.community/2.integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Dans le cas d'articles, le contenu peut être utilisé pour générer des fils d
en utilisant le module [@nuxtjs/feed](https://github.com/nuxt-community/feed-module).

::alert{type="info"}

Pour utiliser `$content` à l'intérieur de l'option `feed`, vous devez ajouter `@nuxt/content` avant `@nuxtjs/feed` dans la propriété `modules`.

Pour utiliser `$content` à l'intérieur de l'option `feed`, vous devez ajouter `@nuxt/content` avant `@nuxtjs/feed` dans la propriété `modules`.
::

Vous pouvez accéder à votre flux via : `baseUrl + baseLinkFeedArticles + file`
Expand Down Expand Up @@ -276,10 +274,8 @@ export default {

Vous pouvez intégrer Nuxt Content avec [Forestry](https://forestry.io) en quelques étapes.

::alert

::alert{type="info"}
Nous vous recommandons de jeter un œil à ce tutoriel réalisé par [Pascal Cauhépé](https://twitter.com/eQRoeil)

👉 &nbsp;https://nuxt-content-and-forestry.netlify.app

::
14 changes: 7 additions & 7 deletions docs/content-v1/ja/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: 'たった2つのステップであなたのNuxtプロジェクト
プロジェクトに `@nuxt/content` の依存関係を追加します。

::code-group
```bash [Yarn]
yarn add @nuxt/content
```
```bash [NPM]
npm install @nuxt/content
```
```bash [Yarn]
yarn add @nuxt/content
```

```bash [NPM]
npm install @nuxt/content
```
::

そして、`nuxt.config.js` の `modules` セクションに `@nuxt/content` を追加します。
Expand Down
8 changes: 2 additions & 6 deletions docs/content-v1/ja/1.getting-started/3.writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ title: Introduction

Description プロパティには、フロントマター プロップ内で定義されていない限り、抜粋コンテンツが含まれます。


::alert{type="info"}
<code>&lt;!--more--&gt;</code> を正確に入力するように注意してください。 つまり、すべて小文字で、空白はありません。
`<!--more-->` を正確に入力するように注意してください。 つまり、すべて小文字で、空白はありません。
::

変数の例がドキュメントに挿入されます。

```json
{
body: Object
Expand Down Expand Up @@ -321,9 +321,7 @@ multiselectOptions:
</div>

::alert{type="info"}

これらのコンポーネントは `<nuxt-content>` コンポーネントを使ってレンダリングされます。[コンテンツを表示する](/ja/displaying#component)を参照してください。

::

またMarkdownの中で`<template>`タグを***使用できない***ことにも注意してください。(例: `v-slot`と使用する)
Expand Down Expand Up @@ -359,9 +357,7 @@ content/
> このページの右側に表示されている目次を例に見てみましょう。

::alert{type="info"}

アプリに目次を実装する方法について、[この実装例](/ja/examples#目次)を参照してください

::

### 用例
Expand Down
2 changes: 0 additions & 2 deletions docs/content-v1/ja/1.getting-started/4.fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ const [prev, next] = await this.$content('articles')
> `surround`を利用する場合、`search`、`limit`、`skip`は考慮されません。

::alert{type="info"}

アプリに前後の記事へのリンクを実装する方法について[この実装例](/ja/examples#ページネーション)を参考にしてください

::

### fetch()
Expand Down
Loading