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/incubator-apisix-website.git
The following commit(s) were added to refs/heads/master by this push: new b59cd75 WIP: feat: Release Guide (#15) b59cd75 is described below commit b59cd75c3753723de9cb998336d27f7585dbf387 Author: 琚致远 <juzhiy...@apache.org> AuthorDate: Wed Feb 12 16:06:06 2020 +0800 WIP: feat: Release Guide (#15) * feat: added initial commit for releasing guide * feat: added GPG * feat: added release guide in Chinese --- assets/style.sass | 3 +- assets/style.scss | 17 +++++++ config.yaml | 8 ++++ content/contribute/release/index.en.md | 56 ++++++++++++++++++++++ content/contribute/release/index.zh.md | 56 ++++++++++++++++++++++ .../contribute/release/gpg-key-generator.html | 33 +++++++++++++ 6 files changed, 172 insertions(+), 1 deletion(-) diff --git a/assets/style.sass b/assets/style.sass index f73e6f9..9e8c1b1 100644 --- a/assets/style.sass +++ b/assets/style.sass @@ -1,3 +1,4 @@ @import "bulma/bulma" @import "fresh/core" -@import "./downloads" \ No newline at end of file +@import "./downloads" +@import "./style" \ No newline at end of file diff --git a/assets/style.scss b/assets/style.scss new file mode 100644 index 0000000..9adc62c --- /dev/null +++ b/assets/style.scss @@ -0,0 +1,17 @@ +.title { + color: #363636; + font-size: 2rem; + font-weight: 600; + line-height: 1.125; +} + +.subtitle { + color: #363636; + font-size: 1.5rem; + font-weight: 600; + line-height: 1.125; +} + +.warning { + font-weight: bold; +} \ No newline at end of file diff --git a/config.yaml b/config.yaml index 61acfe7..ad139d4 100644 --- a/config.yaml +++ b/config.yaml @@ -40,6 +40,10 @@ languages: url: /security - title: Downloads url: /downloads + - title: Get Involved + sublinks: + - title: Release Guide + url: contribute/release language: name: 中 link: /zh @@ -120,6 +124,10 @@ languages: url: security - title: 下载 url: /downloads + - title: 参与 + sublinks: + - title: 发布指南 + url: contribute/release language: name: EN link: / diff --git a/content/contribute/release/index.en.md b/content/contribute/release/index.en.md new file mode 100644 index 0000000..b48e4c1 --- /dev/null +++ b/content/contribute/release/index.en.md @@ -0,0 +1,56 @@ +--- +title: "Release Guide" +date: 2020-01-07T11:46:04+08:00 +include_footer: true +--- + +<div class="release-guide"> + <section> + <h2 class="title">GPG 设置</h2> + <br /> + <h3 class="subtitle">安装 GPG</h3> + <p>在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 版本的命令有细微差别,下列说明以 GnuPG-2.1.23 版本为例。</p> + <p>安装完成后,执行以下命令查看版本号。</p> + {{< highlight go "linenos=table" >}} + gpg --version + {{< / highlight >}} + <h3 class="subtitle">创建 Key</h3> + <p>安装完成后,执行以下命令创建key。</p> + <p>GnuPG-2.x可使用:</p> + {{< highlight go "linenos=table" >}} + gpg --full-gen-key + {{< / highlight >}} + <p>GnuPG-1.x可使用:</p> + {{< highlight go "linenos=table" >}} + gpg --gen-key + {{< / highlight >}} + <p>根据提示完成key:</p> + <p class="warning">注意:请使用Apache mail生成GPG的Key。</p> + {{< highlight go "linenos=table" >}} + {{% contribute/release/gpg-key-generator %}} + {{< / highlight >}} + <h3 class="subtitle">查看生成的key</h3> + {{< highlight go "linenos=table" >}} + gpg --list-keys + {{< / highlight >}} + <p>执行结果:</p> + {{< highlight go "linenos=table" >}} + // 笔者本地电脑 + $ gpg --list-keys + /home/resty/.gnupg/pubring.gpg + ------------------------------ + pub 4096R/30B5FD72 2020-01-02 + uid Yuansheng Wang <membp...@apache.org> + sub 4096R/3D2F913D 2020-01-02 + {{< / highlight >}} + <p>其中 30B5FD72 为公钥 ID。</p> + <h3 class="subtitle">将公钥同步到服务器</h3> + <p>命令如下:</p> + {{< highlight go "linenos=table" >}} + // 最后参数是上面生成的公钥 ID。 + $ gpg --keyserver hkp://pool.sks-keyservers.net --send-key 30B5FD72 + gpg: sending key 30B5FD72 to hkp server pool.sks-keyservers.net + {{< / highlight >}} + <p>pool.sks-keyservers.net为随意挑选的<a href="https://sks-keyservers.net/status/" target="_blank">公钥服务器</a>,每个服务器之间是自动同步的,选任意一个即可。</p> + </section> +</div> \ No newline at end of file diff --git a/content/contribute/release/index.zh.md b/content/contribute/release/index.zh.md new file mode 100644 index 0000000..da79699 --- /dev/null +++ b/content/contribute/release/index.zh.md @@ -0,0 +1,56 @@ +--- +title: "发布指南" +date: 2020-01-07T11:46:04+08:00 +include_footer: true +--- + +<div class="release-guide"> + <section> + <h2 class="title">GPG 设置</h2> + <br /> + <h3 class="subtitle">安装 GPG</h3> + <p>在 GnuPG 官网下载安装包。 GnuPG 的 1.x 版本和 2.x 版本的命令有细微差别,下列说明以 GnuPG-2.1.23 版本为例。</p> + <p>安装完成后,执行以下命令查看版本号。</p> + {{< highlight go "linenos=table" >}} + gpg --version + {{< / highlight >}} + <h3 class="subtitle">创建 Key</h3> + <p>安装完成后,执行以下命令创建key。</p> + <p>GnuPG-2.x可使用:</p> + {{< highlight go "linenos=table" >}} + gpg --full-gen-key + {{< / highlight >}} + <p>GnuPG-1.x可使用:</p> + {{< highlight go "linenos=table" >}} + gpg --gen-key + {{< / highlight >}} + <p>根据提示完成key:</p> + <p class="warning">注意:请使用Apache mail生成GPG的Key。</p> + {{< highlight go "linenos=table" >}} + {{% contribute/release/gpg-key-generator %}} + {{< / highlight >}} + <h3 class="subtitle">查看生成的key</h3> + {{< highlight go "linenos=table" >}} + gpg --list-keys + {{< / highlight >}} + <p>执行结果:</p> + {{< highlight go "linenos=table" >}} + // 笔者本地电脑 + $ gpg --list-keys + /home/resty/.gnupg/pubring.gpg + ------------------------------ + pub 4096R/30B5FD72 2020-01-02 + uid Yuansheng Wang <membp...@apache.org> + sub 4096R/3D2F913D 2020-01-02 + {{< / highlight >}} + <p>其中 30B5FD72 为公钥 ID。</p> + <h3 class="subtitle">将公钥同步到服务器</h3> + <p>命令如下:</p> + {{< highlight go "linenos=table" >}} + // 最后参数是上面生成的公钥 ID。 + $ gpg --keyserver hkp://pool.sks-keyservers.net --send-key 30B5FD72 + gpg: sending key 30B5FD72 to hkp server pool.sks-keyservers.net + {{< / highlight >}} + <p>pool.sks-keyservers.net为随意挑选的<a href="https://sks-keyservers.net/status/" target="_blank">公钥服务器</a>,每个服务器之间是自动同步的,选任意一个即可。</p> + </section> +</div> \ No newline at end of file diff --git a/layouts/shortcodes/contribute/release/gpg-key-generator.html b/layouts/shortcodes/contribute/release/gpg-key-generator.html new file mode 100644 index 0000000..292acc3 --- /dev/null +++ b/layouts/shortcodes/contribute/release/gpg-key-generator.html @@ -0,0 +1,33 @@ +gpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Please select what kind of key you want: + (1) RSA and RSA (default) + (2) DSA and Elgamal + (3) DSA (sign only) + (4) RSA (sign only) +Your selection? 1 +RSA keys may be between 1024 and 4096 bits long. +What keysize do you want? (2048) 4096 +Requested keysize is 4096 bits +Please specify how long the key should be valid. + 0 = key does not expire + <n> = key expires in n days + <n>w = key expires in n weeks + <n>m = key expires in n months + <n>y = key expires in n years +Key is valid for? (0) +Key does not expire at all +Is this correct? (y/N) y + +GnuPG needs to construct a user ID to identify your key. + +Real name: ${输入用户名} +Email address: ${输入邮件地址} +Comment: ${输入注释} +You selected this USER-ID: + "${输入的用户名} (${输入的注释}) <${输入的邮件地址}>" + +Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O +You need a Passphrase to protect your secret key. # 输入密码 \ No newline at end of file