Skip to content

Commit f2b6320

Browse files
committed
- Remove from template because that note refer to the template` option but to the template concept.
- Add some ` for position code words. - "name" become `name` because it's a position code. - Nginx become nginx because it's the official documentaiton name : https://nginx.org/en/. - Change `>=` or `=<` to `+` that is more easy to read and to have consistency accross all documentations. Signed-off-by: Bruno Lesieur <[email protected]>
1 parent 55302e5 commit f2b6320

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

en/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Vue.js Server-Side Rendering Guide
22

33
> **Note:** this guide requires the following minimum versions of Vue and supporting libraries:
4-
> - vue & vue-server-renderer >= 2.3.0
5-
> - vue-router >= 2.5.0
6-
> - vue-loader >= 12.0.0 & vue-style-loader >= 3.0.0
4+
> - vue & vue-server-renderer 2.3.0+
5+
> - vue-router 2.5.0+
6+
> - vue-loader 12.0.0+ & vue-style-loader 3.0.0+
77
88
> If you have previously used Vue 2.2 with SSR, you will notice that the recommended code structure is now [a bit different](./structure.md) (with the new [runInNewContext](./api.md#runinnewcontext) option set to `false`). Your existing app should continue to work, but it's recommended to migrate to the new recommendations.
99

en/caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Although Vue's SSR is quite fast, it can't match the performance of pure string-
66

77
A server-rendered app in most cases relies on external data, so the content is dynamic by nature and cannot be cached for extended periods. However, if the content is not user-specific (i.e. for the same URL it always renders the same content for all users), we can leverage a strategy called [micro-caching](https://www.nginx.com/blog/benefits-of-microcaching-nginx/) to drastically improve our app's capability of handling high traffic.
88

9-
This is usually done at the Nginx layer, but we can also implement it in Node.js:
9+
This is usually done at the nginx layer, but we can also implement it in Node.js:
1010

1111
``` js
1212
const microCache = LRU({
@@ -67,7 +67,7 @@ export default {
6767
}
6868
```
6969

70-
Note that cache-able component **must also define a unique "name" option**. With a unique name, the cache key is thus per-component: you don't need to worry about two components returning the same key.
70+
Note that cache-able component **must also define a unique `name` option**. With a unique name, the cache key is thus per-component: you don't need to worry about two components returning the same key.
7171

7272
The key returned from `serverCacheKey` should contain sufficient information to represent the shape of the render result. The above is a good implementation if the render result is solely determined by `props.item.id`. However, if the item with the same id may change over time, or if render result also relies on another prop, then you need to modify your `getCacheKey` implementation to take those other variables into account.
7373

en/css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ More importantly, `vue-style-loader`, the loader used internally by `vue-loader`
2222

2323
## Enabling CSS Extraction
2424

25-
To extract CSS from `*.vue` files, use `vue-loader`'s `extractCSS` option (requires `vue-loader>=12.0.0`):
25+
To extract CSS from `*.vue` files, use `vue-loader`'s `extractCSS` option (requires `vue-loader` 12.0.0+):
2626

2727
``` js
2828
// webpack.config.js

en/head.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Similar to asset injection, head management follows the same idea: we can dynamically attach data to the render `context` in a component's lifecycle, and then interpolate those data in `template`.
44

5-
> In version >=2.3.2, you can directly access the SSR context in a component as `this.$ssrContext`. In older versions you'd have to manually inject the SSR context by passing it to `createApp()` and expose it on the root instance's `$options` - child components can then access it via `this.$root.$options.ssrContext`.
5+
> In version 2.3.2+, you can directly access the SSR context in a component as `this.$ssrContext`. In older versions you'd have to manually inject the SSR context by passing it to `createApp()` and expose it on the root instance's `$options` - child components can then access it via `this.$root.$options.ssrContext`.
66
77
We can write a simple mixin to perform title management:
88

@@ -38,7 +38,7 @@ const clientTitleMixin = {
3838
}
3939
}
4040

41-
// VUE_ENV can be injected with webpack.DefinePlugin
41+
// `VUE_ENV` can be injected with `webpack.DefinePlugin`
4242
export default process.env.VUE_ENV === 'server'
4343
? serverTitleMixin
4444
: clientTitleMixin
@@ -66,7 +66,7 @@ export default {
6666
}
6767
```
6868

69-
And inside the `template` passed to bundle renderer:
69+
And inside the template passed to bundle renderer:
7070

7171
``` html
7272
<html>

0 commit comments

Comments
 (0)