Skip to content

Commit

Permalink
docs: add to glossary plus fixes (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
debs-obrien committed Aug 12, 2020
1 parent afa9e30 commit c5046b2
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 20 deletions.
7 changes: 3 additions & 4 deletions content/en/faq/nginx-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ server {
}
```

# Using nginx with generated pages and a caching proxy as fallback:
## Using nginx with generated pages and a caching proxy as fallback:

If you have a high volume website with regularly changing content, you might want to benefit from Nuxt generate capabilities and [nginx caching](https://www.nginx.com/blog/nginx-caching-guide).

Expand Down Expand Up @@ -116,12 +116,11 @@ server {
proxy_cache_lock on;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_key $uri$is_args$args;
proxy_cache_purge PURGE from 127.0.0.1;
}
}
```

# nginx configuration for Laravel Forge:
## nginx configuration for Laravel Forge:

Change `YOUR_WEBSITE_FOLDER` to your website folder and `YOUR_WEBSITE_DOMAIN` to your website URL. Laravel Forge will have filled out these values for you but be sure to double check.

Expand Down Expand Up @@ -178,7 +177,7 @@ server {
include forge-conf/YOUR_WEBSITE_FOLDER/after/*;
```

# Secure Laravel Forge with TLS:
## Secure Laravel Forge with TLS:

It's best to let Laravel Forge do the editing of the `nginx.conf` for you, by clicking on Sites -> YOUR_WEBSITE_DOMAIN (SERVER_NAME) and then click on SSL and install a certificate from one of the providers. Remember to activate the certificate. Your `nginx.conf` should now look something like this:

Expand Down
4 changes: 2 additions & 2 deletions content/en/guides/concepts/context-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ The `$nuxt` helper provides a quick way to find out whether the internet connect

### Accessing the root instance

Besides providing DX/UX features, the `$nuxt` helper also provides a shortcut to the root instance of your application from every other component. But that's not everything — you can also access the `$nuxt` helper through `window.$nuxt` which can be used as an escape hatch to gain access to module methods like `$axios` from outside your Vue components. Anyway, this should be used wisely and **only as last resort**.
Besides providing DX/UX features, the `$nuxt` helper also provides a shortcut to the root instance of your application from every other component. But that's not everything — you can also access the `$nuxt` helper through `window.$nuxt` which can be used as an escape hatch to gain access to module methods like `$axios` from outside your Vue components. This should be used wisely and **only as last resort**.

### Refreshing page data

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

Read more in the corresponding loading feature chapter
Read more in the corresponding [loading feature chapter](../features/loading)

## onNuxtReady helper

Expand Down
46 changes: 46 additions & 0 deletions content/en/guides/internals-glossary/$nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ position: 2
---

`$nuxt` is a helper designed to improve user experience.
For more info on the Nuxt.js helper check out the [context and helpers chapter in the Concepts book](https://nuxtjs.org/guides/concepts/context-helpers#nuxt-the-nuxtjs-helper)

## Connection checker

- `isOffline`
- Type: `Boolean`
Expand All @@ -22,3 +25,46 @@ position: 2
</div>
</template>
```

## Refreshing page data

- `refresh()`
- When you want to only refresh the data provided by asyncData or fetch

```html{}[example.vue]
<template>
<div>
<div>{{ content }}</div>
<button @click="refresh">Refresh</button>
</div>
</template>
<script>
export default {
asyncData() {
return { content: 'Created at: ' + new Date() }
},
methods: {
refresh() {
this.$nuxt.refresh()
}
}
}
</script>
```

## Controlling the loading bar

- `$loading`
- When you want to control Nuxt's loading bar programmatically

```js{}[]
export default {
mounted() {
this.$nextTick(() => {
this.$nuxt.$loading.start()
setTimeout(() => this.$nuxt.$loading.finish(), 500)
})
}
}
```
7 changes: 3 additions & 4 deletions content/fr/faq/nginx-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ server {
}
```

# Utiliser nginx avec des pages générées et un proxy de cache en solution de secours
## Utiliser nginx avec des pages générées et un proxy de cache en solution de secours

Si vous avez un site web très important avec du contenu changeant régulièrement, vous voudriez bénéficier des capacités de génération de Nuxt et de [nginx caching](https://www.nginx.com/blog/nginx-caching-guide).

Expand Down Expand Up @@ -115,12 +115,11 @@ server {
proxy_cache_lock on;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_key $uri$is_args$args;
proxy_cache_purge PURGE from 127.0.0.1;
}
}
```

# Configuration nginx pour Laravel Forge
## Configuration nginx pour Laravel Forge

Changez `YOUR_WEBSITE_FOLDER` pour le dossier de votre site web et `YOUR_WEBSITE_DOMAIN` par l'URL de celui-ci. Laravel Forge va remplir ces valeurs pour vous, mais assurez-vous-en avec une double vérification.

Expand Down Expand Up @@ -177,7 +176,7 @@ server {
include forge-conf/REPERTOIRE_DE_VOTRE_SITE_WEB/after/*;
```

# Securisation de Laravel Forge avec TLS
## Securisation de Laravel Forge avec TLS

C'est mieux de laisser Laravel éditer le fichier `nginx.conf pour vous, en cliquant sur Sites -> DOMAINE_DE_VOTRE_SITE_WEB (NOM_DU_SERVEUR) puis cliquer sur SSL et installer un certificat de l'un des fournisseurs. Rappelez-vous d'activer le certificat. Votre fichier`nginx.conf` devrait maintenant ressembler à ça :

Expand Down
7 changes: 3 additions & 4 deletions content/ja/faq/nginx-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ server {
}
```

# nginx を生成されたページに使い、フォールバックとしてのキャッシングプロキシに使う:
## nginx を生成されたページに使い、フォールバックとしてのキャッシングプロキシに使う:

もし、あなたが頻繁に更新するコンテンツがある大容量のウェブサイトを持っているとき、 Nuxt の生成機能と [nginx キャッシング](https://www.nginx.com/blog/nginx-caching-guide) の恩恵が必要となるでしょう。

Expand Down Expand Up @@ -116,12 +116,11 @@ server {
proxy_cache_lock on;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_key $uri$is_args$args;
proxy_cache_purge PURGE from 127.0.0.1;
}
}
```

# Laravel Forge 用の nginx の設定:
## Laravel Forge 用の nginx の設定:

`YOUR_WEBSITE_FOLDER` をウェブサイトのフォルダ名に、`YOUR_WEBSITE_DOMAIN` をウェブサイトの URL に変更してください。Laravel Forge はこれらの値を補完しますが、ダブルチェックを行ってください。

Expand Down Expand Up @@ -178,7 +177,7 @@ server {
include forge-conf/YOUR_WEBSITE_FOLDER/after/*;
```

# TLS で Laravel Forge を保護する:
## TLS で Laravel Forge を保護する:

Laravel Forge に `nginx.conf` の編集を許可するには、Sites -> ウェブサイトドメイン(サーバー名)をクリック 、SSL をクリックしてプロバイダの 1 つから証明書をインストールします。証明書を有効にすることを忘れないでください。`nginx.conf` は以下のようになります:

Expand Down
2 changes: 1 addition & 1 deletion content/ko/guides/get-started/conclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ questions:
- config.js
- nuxt.config.js
correctAnswer: nuxt.config.js
- question: `.vue` 파일에 적합하지 않은 디렉터리는 무엇인가요?
- question: '`.vue` 파일에 적합하지 않은 디렉터리는 무엇인가요?'
answers:
- pages
- static
Expand Down
9 changes: 4 additions & 5 deletions content/zh/faq/nginx-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ category: deployment
position: 213
---

# 使用 nginx 作为反向代理
## 使用 nginx 作为反向代理

```nginx
map $sent_http_content_type $expires {
Expand Down Expand Up @@ -38,7 +38,7 @@ server {
}
```

# 将 nginx 与生成的页面和缓存代理一起使用
## 将 nginx 与生成的页面和缓存代理一起使用

如果您有一个定期更改内容的大量网站,您可能希望受益于 Nuxt 生成功能和[nginx 缓存](https://www.nginx.com/blog/nginx-caching-guide)

Expand Down Expand Up @@ -118,12 +118,11 @@ server {
proxy_cache_lock on;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_key $uri$is_args$args;
proxy_cache_purge PURGE from 127.0.0.1;
}
}
```

# Laravel Forge 的 nginx 配置
## Laravel Forge 的 nginx 配置

`YOUR_WEBSITE_FOLDER` 更改为您的网站文件夹,将 `YOUR_WEBSITE_DOMAIN` 更改为您的网站网址。 Laravel Forge 将为您填写这些,但一定要仔细检查。

Expand Down Expand Up @@ -180,7 +179,7 @@ server {
include forge-conf/YOUR_WEBSITE_FOLDER/after/*;
```

# 使用 TLS 配置 Laravel Forge
## 使用 TLS 配置 Laravel Forge

最好让 Laravel Forge 为您编辑 `nginx.conf` ,点击 Sites -> YOUR_WEBSITE_DOMAIN (SERVER_NAME),然后点击 SSL 并从其中一个提供商安装证书,请记住激活证书,你的 `nginx.conf` 现在应该是这样的:

Expand Down

0 comments on commit c5046b2

Please sign in to comment.