diff --git a/.jekyll-metadata b/.jekyll-metadata index beefda1a..4fc0d14a 100644 Binary files a/.jekyll-metadata and b/.jekyll-metadata differ diff --git a/_config.yml b/_config.yml index af600d55..2dec78b1 100644 --- a/_config.yml +++ b/_config.yml @@ -2,3 +2,5 @@ # Build settings markdown: kramdown +gems: + - jekyll-redirect-from diff --git a/_includes/api/en/4x/app-METHOD.md b/_includes/api/en/4x/app-METHOD.md index 9143e47a..939d280d 100644 --- a/_includes/api/en/4x/app-METHOD.md +++ b/_includes/api/en/4x/app-METHOD.md @@ -4,7 +4,7 @@ Routes an HTTP request, where METHOD is the HTTP method of the request, such as PUT, POST, and so on, in lowercase. Thus, the actual methods are `app.get()`, `app.post()`, `app.put()`, and so on. See below for the complete list. -For more information, see the [routing guide](/guide/routing.html). +For more information, see the [routing guide](/{{ page.lang }}/guide/routing.html). Express supports the following routing methods corresponding to the HTTP methods of the same names: @@ -46,7 +46,7 @@ Express supports the following routing methods corresponding to the HTTP methods
- To route methods which translate to invalid JavaScript variable names, use the bracket notation. For example, + To route methods which translate to invalid JavaScript variable names, use the bracket notation. For example, `app['m-search']('/', function ...`.
diff --git a/_includes/api/en/4x/app-delete-method.md b/_includes/api/en/4x/app-delete-method.md index ec1f2587..a2011321 100644 --- a/_includes/api/en/4x/app-delete-method.md +++ b/_includes/api/en/4x/app-delete-method.md @@ -1,7 +1,7 @@

app.delete(path, callback [, callback ...])

Routes HTTP DELETE requests to the specified path with the specified callback functions. -For more information, see the [routing guide](/guide/routing.html). +For more information, see the [routing guide](/{{ page.lang }}/guide/routing.html). You can provide multiple callback functions that behave just like middleware, except these callbacks can invoke `next('route')` to bypass the remaining route diff --git a/_includes/api/en/4x/app-get-method.md b/_includes/api/en/4x/app-get-method.md index e4822446..47ba6aea 100644 --- a/_includes/api/en/4x/app-get-method.md +++ b/_includes/api/en/4x/app-get-method.md @@ -1,7 +1,7 @@

app.get(path, callback [, callback ...])

Routes HTTP GET requests to the specified path with the specified callback functions. -For more information, see the [routing guide](/guide/routing.html). +For more information, see the [routing guide](/{{ page.lang }}/guide/routing.html). You can provide multiple callback functions that behave just like middleware, except these callbacks can invoke `next('route')` to bypass the remaining route callback(s). diff --git a/_includes/api/en/4x/app-post-method.md b/_includes/api/en/4x/app-post-method.md index 4641c894..4aac47e6 100644 --- a/_includes/api/en/4x/app-post-method.md +++ b/_includes/api/en/4x/app-post-method.md @@ -1,7 +1,7 @@

app.post(path, callback [, callback ...])

Routes HTTP POST requests to the specified path with the specified callback functions. -For more information, see the [routing guide](/guide/routing.html). +For more information, see the [routing guide](/{{ page.lang }}/guide/routing.html). You can provide multiple callback functions that behave just like middleware, except that these callbacks can invoke `next('route')` to bypass the diff --git a/_includes/api/en/4x/app-put-method.md b/_includes/api/en/4x/app-put-method.md index b28a2785..5fca9437 100644 --- a/_includes/api/en/4x/app-put-method.md +++ b/_includes/api/en/4x/app-put-method.md @@ -1,7 +1,7 @@

app.put(path, callback [, callback ...])

Routes HTTP PUT requests to the specified path with the specified callback functions. -For more information, see the [routing guide](/guide/routing.html). +For more information, see the [routing guide](/{{ page.lang }}/guide/routing.html). You can provide multiple callback functions that behave just like middleware, except that these callbacks can invoke `next('route')` to bypass the diff --git a/_includes/api/en/4x/app-settings.md b/_includes/api/en/4x/app-settings.md index 5aba5a13..5ce70c0e 100644 --- a/_includes/api/en/4x/app-settings.md +++ b/_includes/api/en/4x/app-settings.md @@ -154,7 +154,7 @@ A custom query string parsing function will receive the complete query string, a
Options for `trust proxy` setting

- Read [Express behind proxies](/guide/behind-proxies.html) for more + Read [Express behind proxies](/{{ page.lang }}/guide/behind-proxies.html) for more information.

diff --git a/_includes/api/en/4x/app-use.md b/_includes/api/en/4x/app-use.md index bc99736c..9b7c6857 100644 --- a/_includes/api/en/4x/app-use.md +++ b/_includes/api/en/4x/app-use.md @@ -1,11 +1,11 @@

app.use([path,] function [, function...])

-Mounts the [middleware](/guide/using-middleware.html) `function`(s) at the `path`. If `path` is not specified, it defaults to "/". +Mounts the [middleware](/{{ page.lang }}/guide/using-middleware.html) `function`(s) at the `path`. If `path` is not specified, it defaults to "/".
A route will match any path that follows its path immediately with a "/". For example: app.use('/apple', ...) will match "/apple", "/apple/images", - "/apple/images/news", and so on. + "/apple/images/news", and so on.
@@ -231,7 +231,7 @@ app.use(mw1, [mw2, r1, r2], subApp); -Following are some examples of using the [express.static](/guide/using-middleware.html#middleware.built-in) +Following are some examples of using the [express.static](/{{ page.lang }}/guide/using-middleware.html#middleware.built-in) middleware in an Express app. Serve static content for the app from the "public" directory in the application directory: diff --git a/_includes/api/en/4x/express.static.md b/_includes/api/en/4x/express.static.md index f3332316..5d1385bc 100644 --- a/_includes/api/en/4x/express.static.md +++ b/_includes/api/en/4x/express.static.md @@ -17,4 +17,4 @@ The optional `options` object can have the following properties. | `redirect` | Redirect to trailing "/" when the pathname is a directory. | Boolean | `true` | | `setHeaders` | Function for setting HTTP headers to serve with the file. | Function | | -For details on using the middleware, refer [Serving static files in Express](/starter/static-files.html). +For details on using the middleware, refer [Serving static files in Express](/{{ page.lang }}/starter/static-files.html). diff --git a/_includes/api/en/4x/req-hostname.md b/_includes/api/en/4x/req-hostname.md index 56ca0661..16475b3a 100644 --- a/_includes/api/en/4x/req-hostname.md +++ b/_includes/api/en/4x/req-hostname.md @@ -2,7 +2,7 @@ Contains the hostname derived from the `Host` HTTP header. -When the [`trust proxy` setting](/4x/api.html#trust.proxy.options.table) is set +When the [`trust proxy` setting](/{{ page.lang }}/4x/api.html#trust.proxy.options.table) is set to a non-falsey value, the value of the `X-Forwarded-Host` header field will be used instead. This header can be set by the client or by the proxy. diff --git a/_includes/api/en/4x/req-ip.md b/_includes/api/en/4x/req-ip.md index 2813b30d..defb55ef 100644 --- a/_includes/api/en/4x/req-ip.md +++ b/_includes/api/en/4x/req-ip.md @@ -2,7 +2,7 @@ The remote IP address of the request. -When the [`trust proxy` setting](/4x/api.html#trust.proxy.options.table) is set +When the [`trust proxy` setting](/{{ page.lang }}/4x/api.html#trust.proxy.options.table) is set to a non-falsey value, the value is derived from the left-most entry in the `X-Forwarded-For` header. This header can be set by the client or by the proxy. diff --git a/_includes/api/en/4x/req-ips.md b/_includes/api/en/4x/req-ips.md index b331f6e4..4ae736c2 100644 --- a/_includes/api/en/4x/req-ips.md +++ b/_includes/api/en/4x/req-ips.md @@ -1,6 +1,6 @@

req.ips

-When the [`trust proxy` setting](/4x/api.html#trust.proxy.options.table) is set +When the [`trust proxy` setting](/{{ page.lang }}/4x/api.html#trust.proxy.options.table) is set to a non-falsey value, this property contains an array of IP addresses specified in the `X-Forwarded-For` request header. Otherwise, it contains an empty array. This header can be set by the client or by the proxy. diff --git a/_includes/api/en/4x/req-path.md b/_includes/api/en/4x/req-path.md index 4067db1c..d0749e31 100644 --- a/_includes/api/en/4x/req-path.md +++ b/_includes/api/en/4x/req-path.md @@ -9,5 +9,5 @@ req.path ~~~
-When called from a middleware, the mount point is not included in `req.path`. Look up [app.use()](/4x/api.html#app.use) for more details. +When called from a middleware, the mount point is not included in `req.path`. Look up [app.use()](/{{ page.lang }}/4x/api.html#app.use) for more details.
diff --git a/_includes/api/en/4x/req-protocol.md b/_includes/api/en/4x/req-protocol.md index 582ccaed..20710379 100644 --- a/_includes/api/en/4x/req-protocol.md +++ b/_includes/api/en/4x/req-protocol.md @@ -2,7 +2,7 @@ The request protocol string, `http` or `https` when requested with TLS. -When the [`trust proxy` setting](/4x/api.html#trust.proxy.options.table) is set +When the [`trust proxy` setting](/{{ page.lang }}/4x/api.html#trust.proxy.options.table) is set to a non-falsey value, the value of the `X-Forwarded-Proto` header field will be trusted and used if present. This header can be set by the client or by the proxy. diff --git a/_includes/header/header-en.html b/_includes/header/header-en.html index 8f4c9ed6..c3d580c9 100755 --- a/_includes/header/header-en.html +++ b/_includes/header/header-en.html @@ -2,42 +2,42 @@
-