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

docs: minor fixes #495

Merged
merged 1 commit into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion nuxtjs.org/content/.1.learn/1.usage/8.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ If you've defined a file named `_slug.vue` in your pages folder, you can access
</script>
```

If you've defined a file named \_slug.vue inside a folder called \_book you can access the value using the context with params.slug and params.book
If you've defined a file named `_slug.vue` inside a folder called `_book` you can access the value using the context with `params.slug` and `params.book`

```html{}[pages/_book/_slug.vue]
<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Set the middleware for a specific page of the application.

You can create named middleware by creating a file inside the `middleware/` directory, the file name will be the middleware name.

```js{[middleware/authenticated.js]}
```js{}[middleware/authenticated.js]
export default function ({ store, redirect }) {
// If the user is not authenticated
if (!store.state.authenticated) {
Expand All @@ -38,7 +38,7 @@ export default function ({ store, redirect }) {

If you need to use a middleware only for a specific page, you can directly use a function for it (or an array of functions):

```html{[pages/secret.vue]}
```html{}[pages/secret.vue]
<template>
<h1>Secret page</h1>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Now all you have to do is modify your code and push your changes. Pushing your c

### **How to handle dynamic routes**

If you are working with dynamic pages such as \_id.vue then you you will need to add these routes to the generate property in your nuxt config.
If you are working with dynamic pages such as `_id.vue` then you you will need to add these routes to the generate property in your nuxt config.

[See the documentation on how to handle dynamic routes.](/docs/configuration-glossary/configuration-generate#routes)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
}
```

If however you want to automatically apply headers and redirects of the application then there is a module for that, this is especially useful for when you have custom headers/redirects (in a \_headers or \_redirects file):
If however you want to automatically apply headers and redirects of the application then there is a module for that, this is especially useful for when you have custom headers/redirects (in a `_headers` or `_redirect` file):

[netlify-files-module](https://github.com/nuxt-community/netlify-files-module)

Expand Down
4 changes: 2 additions & 2 deletions nuxtjs.org/content/0.docs/4.directory-structure/9.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can also create routes with .js files and .ts files

Every Page component is a Vue component but Nuxt.js adds special attributes and functions to make the development of your universal application as easy as possible.

```html{}[pages
```html{}[pages]
<template>
<h1 class="red">Hello {{ name }}!</h1>
</template>
Expand Down Expand Up @@ -51,7 +51,7 @@ If you've defined a file named `_slug.vue` in your pages folder, you can access
</script>
```

If you've defined a file named \_slug.vue inside a folder called \_book you can access the value using the context with params.slug and params.book
If you've defined a file named `_slug.vue` inside a folder called `_book` you can access the value using the context with `params.slug` and `params.book`

```html{}[pages/_book/_slug.vue]
<template>
Expand Down
2 changes: 1 addition & 1 deletion nuxtjs.org/content/0.docs/8.deployment/16.netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
}
```

If however you want to automatically apply headers and redirects of the application then there is a module for that, this is especially useful for when you have custom headers/redirects (in a \_headers or \_redirects file):
If however you want to automatically apply headers and redirects of the application then there is a module for that, this is especially useful for when you have custom headers/redirects (in a `_headers` or `_redirects` file):

[netlify-files-module](https://github.com/nuxt-community/netlify-files-module)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Now all you have to do is modify your code and push your changes. Pushing your c

### **How to handle dynamic routes**

If you are working with dynamic pages such as \_id.vue then you you will need to add these routes to the generate property in your nuxt config.
If you are working with dynamic pages such as `_id.vue` then you you will need to add these routes to the generate property in your nuxt config.

[See the documentation on how to handle dynamic routes.](/docs/configuration-glossary/configuration-generate#routes)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Définit le middleware pour une page spécifique de l'application.

Vous pouvez nommer votre middleware en créant un fichier à l'intérieur du répertoire `middleware/`, le nom du fichier sera le nom du middleware.

```js{[middleware/authenticated.js]}
```js{}[middleware/authenticated.js]
export default function ({ store, redirect }) {
// Si l'utilisateur n'est pas authentifié
if (!store.state.authenticated) {
Expand All @@ -40,7 +40,7 @@ export default function ({ store, redirect }) {

Si l'on ressent le besoin d'utiliser un middleware seulement pour une page spécifique, on peut directement utiliser une fonction pour cela (voire même un tableau de fonctions):

```html{[pages/secret.vue]}
```html{}[pages/secret.vue]
<template>
<h1>Page secrète</h1>
</template>
Expand Down
2 changes: 1 addition & 1 deletion nuxtjs.org/content/fr/0.docs/8.deployment/16.netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
}
```

Si toutefois vous souhaitez appliquer automatiquement les en-têtes et les redirections de l'application, il existe un module pour cela, particulièrement utile pour les headers/redirects custom (dans un \_headers ou \_redirects):
Si toutefois vous souhaitez appliquer automatiquement les en-têtes et les redirections de l'application, il existe un module pour cela, particulièrement utile pour les headers/redirects custom (dans un `_headers` ou `_redirects`):

[netlify-files-module](https://github.com/nuxt-community/netlify-files-module)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Now all you have to do is modify your code and push your changes. Pushing your c

### **How to handle dynamic routes**

If you are working with dynamic pages such as \_id.vue then you you will need to add these routes to the generate property in your nuxt config.
If you are working with dynamic pages such as `_id.vue` then you you will need to add these routes to the generate property in your nuxt config.

[See the documentation on how to handle dynamic routes.](/docs/2.x/configuration-glossary/configuration-generate#routes)

Expand Down