Skip to content

Commit

Permalink
docs: fix links (#2267)
Browse files Browse the repository at this point in the history
Co-authored-by: Farnabaz <[email protected]>
  • Loading branch information
nobkd and farnabaz authored Sep 15, 2023
1 parent bbab9dd commit 5cc55ca
Show file tree
Hide file tree
Showing 32 changed files with 110 additions and 111 deletions.
2 changes: 1 addition & 1 deletion docs/content-v1/en/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Using `$content()` on a directory to list, filter and search content:

## Tutorial

[Create a blog with Nuxt Content](https://nuxtjs.org/blog/creating-blog-with-nuxt-content)
[Create a blog with Nuxt Content](https://v2.nuxt.com/tutorials/creating-blog-with-nuxt-content)

## Testimonials

Expand Down
18 changes: 9 additions & 9 deletions docs/content-v1/en/1.getting-started/3.writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ It will be transformed to its JSON AST structure, and by using the `nuxt-content

Links are transformed to add valid `target` and `rel` attributes using [remark-external-links](https://github.com/remarkjs/remark-external-links). You can check [here](/v1/getting-started/configuration#markdown) to learn how to configure this plugin.

Relative links are also automatically transformed to [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/) to provide navigation between page components with enhanced performance through smart prefetching.
Relative links are also automatically transformed to [nuxt-link](https://v2.nuxt.com/docs/features/nuxt-components#the-nuxtlink-component) to provide navigation between page components with enhanced performance through smart prefetching.

Here is an example using external, relative, markdown and html links:

Expand All @@ -152,9 +152,9 @@ title: Home

[Markdown Link to Blog](/articles)

<a href="https://nuxtjs.org">External link html</a>
<a href="https://v2.nuxt.com">External link html</a>

[External Link markdown](https://nuxtjs.org)
[External Link markdown](https://v2.nuxt.com)
```

### Footnotes
Expand All @@ -177,7 +177,7 @@ Here's a simple footnote,[^1] and here's a longer one.[^bignote]
Add as many paragraphs as you like.
```

> You can check the [extended syntax guide](https://www.markdownguide.org/extended-syntax/#footnotes) for more information about footnotes.
> You can check the [extended syntax guide](https://www.markdownguide.org/extended-syntax#footnotes) for more information about footnotes.
### Codeblocks

Expand Down Expand Up @@ -222,7 +222,7 @@ Line numbers are added to the `pre` tag in `data-line` attribute.
Filename will be converted to a span with a `filename` class. It's up to you to style it.

> Check out [the main.css file](https://github.com/nuxt/content/blob/dev/packages/theme-docs/src/assets/css/main.css#L56) of this documentation for an example on styling filenames.
> Check out [the main.css file](https://github.com/nuxt/content/blob/v1-dev/packages/theme-docs/src/assets/css/main.css#L56) of this documentation for an example on styling filenames.
### Syntax highlighting

Expand Down Expand Up @@ -300,7 +300,7 @@ But **this will**:

**Example**

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

```md[home.md]
Please choose a *framework*:
Expand Down Expand Up @@ -355,8 +355,8 @@ You can use `template` tags for content distribution inside your Vue.js componen
```

However, you cannot render
[dynamic content](https://vuejs.org/v2/guide/syntax.html) nor use
[slot props](https://vuejs.org/v2/guide/components-slots.html#Scoped-Slots). I.e.,
[dynamic content](https://v2.vuejs.org/v2/guide/syntax.html) nor use
[slot props](https://v2.vuejs.org/v2/guide/components-slots.html#Scoped-Slots). I.e.,
**this wont work**:

```html
Expand Down Expand Up @@ -494,7 +494,7 @@ Since the `slug` is by default taken from the path and missing in this case, you

</alert>

> Check out our [example](https://github.com/nuxt/content/tree/dev/example) with articles and authors.
> Check out our [example](https://github.com/nuxt/content/tree/v1-dev/example) with articles and authors.
### Example

Expand Down
2 changes: 1 addition & 1 deletion docs/content-v1/en/1.getting-started/5.displaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Depending on what you're using to design your app, you may need to write some st
}
```

> You can find an example in the theme-docs [main.css](https://github.com/nuxt/content/blob/master/packages/theme-docs/src/assets/css/main.css) file. You can also take a look at the [TailwindCSS Typography plugin](https://tailwindcss.com/docs/typography-plugin) to style your markdown content like we do in the `@nuxt/content-theme-docs`.
> You can find an example in the theme-docs [main.css](https://github.com/nuxt/content/blob/v1/packages/theme-docs/src/assets/css/main.css) file. You can also take a look at the [TailwindCSS Typography plugin](https://tailwindcss.com/docs/typography-plugin) to style your markdown content like we do in the `@nuxt/content-theme-docs`.
## Live Editing

Expand Down
10 changes: 5 additions & 5 deletions docs/content-v1/en/1.getting-started/6.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ content: {
- Default: `'content'`

Directory used for writing content.
You can give an absolute path, if relative, it will be resolved with Nuxt [srcDir](https://nuxtjs.org/api/configuration-srcdir).
You can give an absolute path, if relative, it will be resolved with Nuxt [srcDir](https://v2.nuxt.com/docs/configuration-glossary/configuration-srcdir).

```js [nuxt.config.js]
content: {
Expand Down Expand Up @@ -214,15 +214,15 @@ You can change maximum heading depth to include in the table of contents.
- Default: `['remark-squeeze-paragraphs', 'remark-slug', 'remark-autolink-headings', 'remark-external-links', 'remark-footnotes']`
- Version: **>= v1.4.0**

> You can take a look at the list of [remark plugins](https://github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins).
> You can take a look at the list of [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins).
### `markdown.rehypePlugins`

- Type: `Array`
- Default: `['rehype-minify-whitespace', 'rehype-sort-attribute-values', 'rehype-sort-attributes', 'rehype-raw']`
- Version: **>= v1.4.0**

> You can take a look at the list of [rehype plugins](https://github.com/rehypejs/rehype/blob/master/doc/plugins.md#list-of-plugins).
> You can take a look at the list of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins).
### `markdown.basePlugins`

Expand Down Expand Up @@ -282,7 +282,7 @@ content: {
- Type: `Highlighter` | `PromisedHighlighter`
- Version: **>=1.9.0**

You can change the default code highlighter in markdown content by using this option. As an example, we use [highlight.js](https://highlightjs.org/).
You can change the default code highlighter in markdown content by using this option. As an example, we use [highlight.js](https://highlightjs.org).

```js [nuxt.config.js]
import highlightjs from 'highlight.js'
Expand Down Expand Up @@ -482,7 +482,7 @@ const parseTxt = file => file.split('\n').map(line => line.trim())

### `editor`

You can provide a custom editor for editing your markdown files in development. Set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/master/packages/content/templates/editor.vue).
You can provide a custom editor for editing your markdown files in development. Set the `editor` option to a path to your editor component. The code of the default editor you can find [here](https://github.com/nuxt/content/blob/v1/packages/content/templates/editor.vue).


```js [nuxt.config.js]
Expand Down
10 changes: 5 additions & 5 deletions docs/content-v1/en/1.getting-started/7.advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Since Nuxt 2.14+, `nuxt generate` has a crawler feature integrated which will cr

Also, `nuxt generate` will automagically skip webpack build step when no code has been changed and use the previous build using cache. The content module integrates with this feature to ignore changes inside the `content/` folder. In other terms, when changing the content of your site and deploying, the build will be skipped.

> Learn more in [this article](https://nuxtjs.org/blog/nuxt-static-improvements).
> Learn more in [this article](https://nuxt.com/blog/nuxt-static-improvements).
When using Nuxt <= 2.12, you might need to specify the dynamic routes with [generate.routes](https://nuxtjs.org/api/configuration-generate/#routes)
When using Nuxt <= 2.12, you might need to specify the dynamic routes with [generate.routes](https://v2.nuxt.com/docs/configuration-glossary/configuration-generate#routes)

**Example**

Expand Down Expand Up @@ -103,7 +103,7 @@ Arguments:
- `database`
- Type: `object`
- Properties:
- See [type definition](https://github.com/nuxt/content/blob/master/packages/content/types/database.d.ts)
- See [type definition](https://github.com/nuxt/content/blob/v1/packages/content/types/database.d.ts)

**Example**

Expand Down Expand Up @@ -209,7 +209,7 @@ export default {
```

Now everytime you will update a file in your `content/` directory, it will also dispatch the `fetchCategories` method.
This documentation uses it actually. You can learn more by looking at [plugins/init.js](https://github.com/nuxt/content/blob/master/docs/plugins/init.js).
This documentation uses it actually. You can learn more by looking at [plugins/init.js](https://github.com/nuxt/content/blob/v1.5.0/docs/plugins/init.js).

## API Endpoint

Expand Down Expand Up @@ -250,4 +250,4 @@ Since **v1.4.0**, this endpoint also supports `where` in query params:

`http://localhost:3000/_content/products?categories.slug_contains=top`

> You can learn more about that endpoint in [lib/middleware.js](https://github.com/nuxt/content/blob/main/packages/content/lib/middleware.js).
> You can learn more about that endpoint in [lib/middleware.js](https://github.com/nuxt/content/blob/v1/packages/content/lib/middleware.js).
10 changes: 5 additions & 5 deletions docs/content-v1/en/3.community/1.snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {

### head

Add dynamic metas based on title and description defined in the [front-matter](https://content.nuxtjs.org/writing#front-matter):
Add dynamic metas based on title and description defined in the [front-matter](/v1/getting-started/writing#front-matter):

```js
export default {
Expand Down Expand Up @@ -268,7 +268,7 @@ import highlightjs from 'highlight.js'
const wrap = (code, lang) => `<pre><code class="hljs ${lang}">${code}</code></pre>`
export default {
// Complete themes: https://github.com/highlightjs/highlight.js/tree/master/src/styles
// Complete themes: https://github.com/highlightjs/highlight.js/tree/main/src/styles
css: ['highlight.js/styles/nord.css'],
modules: ['@nuxt/content'],
Expand Down Expand Up @@ -302,7 +302,7 @@ export default {
markdown: {
async highlighter() {
const highlighter = await shiki.getHighlighter({
// Complete themes: https://github.com/shikijs/shiki/tree/master/packages/themes
// Complete themes: https://github.com/shikijs/shiki/tree/main/packages/shiki/themes
theme: 'nord'
})
return (rawCode, lang) => {
Expand All @@ -320,7 +320,7 @@ export default {

To get a better idea of how Twoslash works, you can go over to the [Official TypeScript Documentation](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#type-aliases) and hover over some code examples there.

You can achieve the same result by using [Shiki Twoslash](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/shiki-twoslash). This package is also the one that powers the Official TypeScript Documentation.
You can achieve the same result by using [Shiki Twoslash](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ts-twoslasher). This package is also the one that powers the Official TypeScript Documentation.

```js{}[nuxt.config.js]
import {
Expand All @@ -336,7 +336,7 @@ export default {
markdown: {
async highlighter() {
const highlighter = await createShikiHighlighter({
// Complete themes: https://github.com/shikijs/shiki/tree/master/packages/themes
// Complete themes: https://github.com/shikijs/shiki/tree/main/packages/shiki/themes
theme: 'nord'
})
return (rawCode, lang) => {
Expand Down
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 @@ -233,7 +233,7 @@ const create = async (feed, args) => {
return feed;
}
```
Retrieving just the markdown works great if you're using the feed to integrate with [dev.to](https://dev.to/) or [medium](https://medium.com/) since both of these sites use markdown in their editors.
Retrieving just the markdown works great if you're using the feed to integrate with [dev.to](https://dev.to) or [medium](https://medium.com) since both of these sites use markdown in their editors.


## @nuxtjs/sitemap
Expand Down Expand Up @@ -274,7 +274,7 @@ export default {

## Forestry CMS

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

<alert type="info">

Expand Down
12 changes: 6 additions & 6 deletions docs/content-v1/fr/1.getting-started/3.writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ title: Accueil

<a href="/articles">Lien Html vers le Blog</a>

[Lien Markdown vers le Blog](/fr/articles)
[Lien Markdown vers le Blog](/articles)

<a href="https://nuxtjs.org">Lien Html externe</a>
<a href="https://v2.nuxt.com">Lien Html externe</a>

[Lien Markdown externe](https://nuxtjs.org)
[Lien Markdown externe](https://v2.nuxt.com)
```

### Notes de bas de page
Expand All @@ -169,7 +169,7 @@ Voici une note de bas de page basique,[^1] et en voici une longue.[^bignote]
Ajoutez autant de paragraphes que vous le voulez.
```

> Vous pouvez consulter le [guide syntaxique avancé](https://www.markdownguide.org/extended-syntax/#footnotes) pour plus d'informations à propos des notes de bas de page.
> Vous pouvez consulter le [guide syntaxique avancé](https://www.markdownguide.org/extended-syntax#footnotes) pour plus d'informations à propos des notes de bas de page.
### Blocs de code

Expand Down Expand Up @@ -258,7 +258,7 @@ Lorsque vous voulez intégrer du Markdown à l'intérieur d'un composant, veille

Vous pouvez utiliser des composants Vue enregistrés globalement ou localement au sein de la page où vous affichez votre Markdown.

Étant donné que `@nuxt/content` fonctionne selon l'hypothèse que tout Markdown est fourni par l'auteur (et non par un utilisateur tiers), les sources sont traitées dans leur intégralité (balises incluses), avec certaines mises en garde de [rehype-raw](https : //github.com/rehypejs/rehype-raw):
Étant donné que `@nuxt/content` fonctionne selon l'hypothèse que tout Markdown est fourni par l'auteur (et non par un utilisateur tiers), les sources sont traitées dans leur intégralité (balises incluses), avec certaines mises en garde de [rehype-raw](https://github.com/rehypejs/rehype-raw):

1. Vous devez faire référence à vos composants en utilisant la syntaxe kebab case:

Expand All @@ -280,7 +280,7 @@ Mais **ceci fonctionnera**:

**Exemple:**

Disons que nous avons un composant Vue nommé [ExampleMultiselect.vue](https://github.com/nuxt/content/blob/master/docs/components/global/examples/ExampleMultiselect.vue):
Disons que nous avons un composant Vue nommé [ExampleMultiselect.vue](https://github.com/nuxt/content/blob/v1.14.0/docs/components/global/examples/ExampleMultiselect.vue):

```md[home.md]
Veuillez choisir un *framework*:
Expand Down
2 changes: 1 addition & 1 deletion docs/content-v1/fr/1.getting-started/4.fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ Cet endpoint est accessible via des requêtes `GET` et `POST`, vous pouvez donc

[http://localhost:3000/_content/articles?only=titre&only=description&limit=10](http://localhost:3000/_content/articles?only=titre&only=description&limit=10).

Vous pouvez en apprendre plus à propos de cet endpoint dans [lib/middleware.js](https://github.com/nuxt/content/blob/master/lib/middleware.js).
Vous pouvez en apprendre plus à propos de cet endpoint dans [lib/middleware.js](https://github.com/nuxt/content/blob/v1/packages/content/lib/middleware.js).
2 changes: 1 addition & 1 deletion docs/content-v1/fr/1.getting-started/5.displaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Le composant `<nuxt-content>` ajoutera automatiquement la classe `.nuxt-content`
}
```

Vous pouvez trouver un exemple dans le [répertoire docs](https://github.com/nuxt/content/blob/master/docs/pages/_slug.vue).
Vous pouvez trouver un exemple dans le [répertoire docs](https://github.com/nuxt/content/blob/v1.5.0/docs/pages/_slug.vue).
4 changes: 2 additions & 2 deletions docs/content-v1/fr/1.getting-started/6.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ content: {
- 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.
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://v2.nuxt.com/docs/configuration-glossary/configuration-srcdir) de Nuxt.

```js [nuxt.config.js]
content: {
Expand Down Expand Up @@ -80,7 +80,7 @@ Ce module se sert de [remark](https://github.com/remarkjs/remark) afin de compil

Par défaut, ce module a recours à des plugins pour améliorer la conversion du Markdown. Vous pouvez ajouter vos propres plugins ou modifier ceux par défaut en utilisant la propriété `basePlugins`. Chaque plugin est configuré en utilisant son nom en camelCase : `remark-external-links` => `externalLinks`.

> Vous pouvez retrouver des plugins pour remark [ici](https://github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins).
> Vous pouvez retrouver des plugins pour remark [ici](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins).
### `markdown.basePlugins`

Expand Down
2 changes: 1 addition & 1 deletion docs/content-v1/fr/1.getting-started/7.advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
}
```

Dès lors que vous opèrerez un changement sur un des fichiers au sein du répertoire `content/`, la méthode `fetchCategories` sera appelée. D'ailleurs, cette documentation l'utilise, vous pouvez en apprendre davantage en jetant un oeil à [plugins/categories.js](https://github.com/nuxt/content/blob/master/docs/plugins/categories.js).
Dès lors que vous opèrerez un changement sur un des fichiers au sein du répertoire `content/`, la méthode `fetchCategories` sera appelée. D'ailleurs, cette documentation l'utilise, vous pouvez en apprendre davantage en jetant un oeil à [plugins/categories.js](https://github.com/nuxt/content/blob/v1.4.0/docs/plugins/categories.js).

## Intégration avec @nuxtjs/feed

Expand Down
Loading

0 comments on commit 5cc55ca

Please sign in to comment.