From 3f1f6dcf6881ece2fd068bd66574003ce4c6c3a1 Mon Sep 17 00:00:00 2001 From: Oopsguy Date: Mon, 4 Feb 2019 12:38:49 +0800 Subject: [PATCH] Fixed wrong language highlight identifier #20 --- README.md | 18 ++++++++++++++++++ .../http/ngx_http_core_module.md" | 2 +- .../http/ngx_http_grpc_module.md" | 2 +- .../http/ngx_http_limit_conn_module.md" | 2 +- .../http/ngx_http_limit_req_module.md" | 2 +- .../http/ngx_http_perl_module.md" | 6 +++--- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ed478a4..c958490 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,24 @@ Nginx 官方文档中文翻译版,由本人在学习 nginx 时顺带翻译。 在线阅读:[Github](https://github.com/DocsHome/nginx-docs/blob/master/SUMMARY.md) | [GitBook](https://www.gitbook.com/book/docshome/nginx-docs/details) +## 安装 + +如果你没有安装 gitbook,则先使用 npm(或者 cnpm)安装 `gitbook-cli`: + +```shell +npm install gitbook-cli -g +``` + +进入项目根目录,执行以下命令运行 gitbook: + +```shell +gitbook install +``` + +```shell +gitbook serve +``` + ## 项目状态 翻译中…… diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_core_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_core_module.md" index 51eebfe..4f8359b 100644 --- "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_core_module.md" +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_core_module.md" @@ -1212,7 +1212,7 @@ server { 也可以在服务器名称中使用正则表达式,在名称前面加上波浪号(`〜`): -```ngixn +```nginx server { server_name www.example.com ~^www\d+\.example\.com$; } diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_grpc_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_grpc_module.md" index 3319be4..c02a24e 100644 --- "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_grpc_module.md" +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_grpc_module.md" @@ -215,7 +215,7 @@ grpc_bind $remote_addr transparent; 设置 gRPC 服务器地址。该地址可以指定为域名或 IP 地址以及端口: -```ngixn +```nginx grpc_pass localhost:9000; ``` 或使用 UNIX 域套接字路径: diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_conn_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_conn_module.md" index 4c81344..2f906d0 100644 --- "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_conn_module.md" +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_conn_module.md" @@ -108,7 +108,7 @@ server { 用法示例: -```ngixn +```nginx limit_conn_zone $binary_remote_addr zone=addr:10m; ``` diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_req_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_req_module.md" index c50800e..d5f5b43 100644 --- "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_req_module.md" +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_limit_req_module.md" @@ -109,7 +109,7 @@ server { 用法示例: -```ngixn +```nginx limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; ``` diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_perl_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_perl_module.md" index 8e08099..22aec2b 100644 --- "a/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_perl_module.md" +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/http/ngx_http_perl_module.md" @@ -67,7 +67,7 @@ http { The perl/lib/hello.pm module: -```pm +```perl package hello; use nginx; @@ -163,7 +163,7 @@ __END__ 如果请求中没有请求体,则返回 0。如果存在,则为请求设置指定的处理程序,并返回 1。在读取请求体后,nginx 将调用指定的处理程序。请注意,处理函数应该通过引用传递。例: - ```pm + ```perl package hello; use nginx; @@ -267,7 +267,7 @@ __END__ 设置指定的处理程序(`handler`)和指定停止请求处理的时间(`milliseconds`)。在此期间,nginx 继续处理其他请求。在经过指定的时间后,nginx 将调用已安装的处理程序。请注意,处理函数应该通过引用传递。为了在处理程序之间传递数据,应使用 `$r->variable()`。例: - ```pm + ```perl package hello; use nginx;