This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bb3422  feat(CI): add a GitHub Action to lint the Markdown (#3041)
3bb3422 is described below

commit 3bb3422852ec111e7e28ba9d616621b3ab0e98c2
Author: John Bampton <[email protected]>
AuthorDate: Tue Dec 15 11:29:47 2020 +1000

    feat(CI): add a GitHub Action to lint the Markdown (#3041)
    
    - add a Markdownlint config file
    - lint Markdownlint for MD039 - Spaces inside link text
    
    https://www.npmjs.com/package/markdownlint-cli
---
 .github/workflows/lint.yml      | 16 +++++++++++
 .gitignore                      |  1 +
 .markdownlint.yml               | 60 +++++++++++++++++++++++++++++++++++++++++
 doc/zh-cn/getting-started.md    |  2 +-
 doc/zh-cn/plugins/mqtt-proxy.md |  2 +-
 5 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..3a283bb
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,16 @@
+name: ❄️ Lint
+
+on: [pull_request]
+
+jobs:
+  markdownlint:
+    name: 🍇 Markdown
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: 🚀 Use Node.js
+        uses: actions/setup-node@v1
+        with:
+          node-version: '12.x'
+      - run: npm install -g [email protected]
+      - run: markdownlint '**/*.md' --ignore node_modules
diff --git a/.gitignore b/.gitignore
index 6bf3a23..f1df305 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,6 +60,7 @@ default.etcd/
 !.github/
 !.travis/
 !.gitmodules
+!.markdownlint.yml
 /conf/apisix.yaml
 /conf/apisix-*.yaml
 /conf/config-*.yaml
diff --git a/.markdownlint.yml b/.markdownlint.yml
new file mode 100644
index 0000000..5f1b4dc
--- /dev/null
+++ b/.markdownlint.yml
@@ -0,0 +1,60 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+MD001: false
+MD002: false
+MD003: false
+MD004: false
+MD005: false
+MD006: false
+MD007: false
+MD009: false
+MD010: false
+MD011: false
+MD012: false
+MD013: false
+MD014: false
+MD018: false
+MD019: false
+MD020: false
+MD021: false
+MD022: false
+MD023: false
+MD024: false
+MD025: false
+MD026: false
+MD027: false
+MD028: false
+MD029: false
+MD030: false
+MD031: false
+MD032: false
+MD033: false
+MD034: false
+MD035: false
+MD036: false
+MD037: false
+MD038: false
+MD040: false
+MD041: false
+MD042: false
+MD043: false
+MD044: false
+MD045: false
+MD046: false
+MD047: false
+MD048: false
diff --git a/doc/zh-cn/getting-started.md b/doc/zh-cn/getting-started.md
index 0478d88..e9d13ce 100644
--- a/doc/zh-cn/getting-started.md
+++ b/doc/zh-cn/getting-started.md
@@ -76,7 +76,7 @@ $ curl "http://127.0.0.1:9080/apisix/admin/services/"; -H 
'X-API-KEY: edd1c9f0343
 
 ## 第二步: 在 Apache APISIX 中创建 Route
 
-为了配置各种 routes / services / plugins ,APISIX 提供了强大的 Admin API 和一个[ web控制台 
](https://github.com/apache/apisix-dashboard)。
+为了配置各种 routes / services / plugins ,APISIX 提供了强大的 Admin API 和一个 
[web控制台](https://github.com/apache/apisix-dashboard)。
 本指南将会使用到 Admin API 接口。
 
 一个微服务可以通过 APISIX 的路由、服务、上游和插件等多个实体之间的关系进行配置。
diff --git a/doc/zh-cn/plugins/mqtt-proxy.md b/doc/zh-cn/plugins/mqtt-proxy.md
index 56c211f..343297e 100644
--- a/doc/zh-cn/plugins/mqtt-proxy.md
+++ b/doc/zh-cn/plugins/mqtt-proxy.md
@@ -29,7 +29,7 @@
 
 `mqtt-proxy` 只工作在流模式,它可以帮助你根据 MQTT 的 `client_id` 实现动态负载均衡。
 
-这个插件支持 MQTT [3.1.* ]( 
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html )及[5.0]( 
https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html )两个协议。
+这个插件支持 MQTT 
[3.1.*](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html) 
及[5.0]( https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html )两个协议。
 
 ## 属性
 

Reply via email to