You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/14 08:27:41 UTC

[GitHub] [apisix-website] hf400159 commented on a diff in pull request #1094: docs: add Chinese translation about blog-contributing-guide

hf400159 commented on code in PR #1094:
URL: https://github.com/apache/apisix-website/pull/1094#discussion_r872951249


##########
website/i18n/zh/docusaurus-plugin-content-docs/current/blog-contributing-guide.md:
##########
@@ -0,0 +1,199 @@
+---
+id: blog
+title: 博客贡献指南
+keywords:
+- API 网关
+- APISIX
+- Apache APISIX
+- 博客
+- 如何写一篇博客
+description: 在 Apache APISIX 网站上撰写或更新博客指南。
+---
+
+在 Apache APISIX 网站上撰写或更新[博客](/blog/)请遵循本篇指南。
+
+如果你对已经发布的博客存有疑问欢迎提交一份 [issue](/docs/general/submit-issue)。如果有意愿的话可以同时创建一个 [PR](/docs/general/contributor-guide/#open-a-pull-request) 自己来修复它。
+
+博客同时以[中文](/zh/blog/)和[英文](/blog/)撰写, 贡献者可以自由的根据自己的喜好选择使用哪种语言,翻译工作会在未来进行并且你也可以 review 相应 PR。
+
+英文博客在 `website/blog` 目录下,根据年月日信息分类。
+
+举个例子,`website/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes.md` 意味着一个名为 `develop-apisix-ingress-with-nocalhost-in-kubernetes.md`
+的博客在2021年11月22号发表,它被存放在 `website/blog/2021/11/22` 目录下。在它完成 review 并合并后,相应的URL会是 `https://apisix.apache.org/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes`。
+
+类似的,中文博客在 `website/zh/blog` 目录下,根据上述一样的方式分类。
+
+## 可以贡献的领域
+
+你可以撰写博客介绍你是如何使用 Apache APISIX 的或者是如何为 Apache APISIX 做贡献。
+
+你也可以更新已经发布的博客,包括不限于更新博客内容,修复 issues 中提到的链接损坏或是拼写错误。
+
+### 撰写一份新博客
+
+撰写一份新博客是为 Apache APISIX 做贡献的最好方式之一。Apache APISIX 项目的使用者和贡献者都能从你的博客中学习经验。
+
+1. 首先要找到一个正确的地方存放新的博客。
+    1. 如果你用**英文**撰写博客,请在 `website/blog` 目录下新建一个 Markdown 文件。
+    2. 如果你用**中文**撰写博客,请在 `website/i18n/zh/docusaurus-plugin-content-blog` 目录下新建一个 Markdown 文件。
+    3. 如果你未能找到一个合适的目录匹配年月日,你可以新建一个文件夹来存放博客。
+
+2. 当你找到了一个存放你的博客的地方,你就可以在这个目录中创建一个 Markdown 文件。请注意,文件名使用英文,并且避免大写字母。Reviewers 可能会建议你改变文件名以提升 SEO(有些文件名含有大写字母,这一点正在 [#713](https://github.com/apache/apisix-website/issues/713) 中被修复)。
+
+3. 你可以通过编辑 Markdown 文件把文字、图片、图表添加到你的博客中。你可以从 [Markdown 指南](https://www.markdownguide.org/)了解更多关于 Markdown 格式的信息。 
+    - 添加图片前请先将图片上传到[公共图片 CDN 服务](https://Markdown.apiseven.com)然后在 Markdown 文件中添加图片链接。
+    <!-- This link seems to be broken -->
+    - 图表总是蕴涵了大量信息,我们很乐意看到他们。从经验来看小于等于4列的图表在网页上显得更加美观。
+
+4. 根据你新建的博客[创建一个 PR](/docs/general/contributor-guide/#open-a-pull-request)。
+
+:::note
+
+你可以通过在本地搭建网页检查你的修改。这可以确保在你提交 PR 之前没有任何错别字或遗留问题。我们会运行 CI 来检查捕捉这些错误,但更推荐在本地测试先做测试。
+
+:::
+
+<!-- Future: Move this to the contributing guide -->
+运行以下命令可以在本地搭建网页:
+
+```shell
+cd website
+yarn start
+```
+
+#### 配置博客元信息
+
+每一个博客源文件都包含一个 YAML 前言或标题,它们被两行 `---` 分隔开。
+
+元信息中包含了类似`标题`,`描述`,`作者`和`标签`的字段。一些可以参考的模板如下:
+
+##### 单作者模板
+
+如果你的博客只有一个作者可以使用以下模板:
+
+```Markdown
+title: "Blog's Title"
+authors:
+  - name: "Author's Name"
+    title: "Author"
+    url: "Author's GitHub"
+    image_url: "Author's Image URL"
+keywords:
+- keywords 1
+- keywords 2
+- keywords 3
+- keywords 4
+- keywords 5
+description: Description of the post
+tags: [tag1,tag2,...,tagn]
+```
+
+##### 共同作者模板
+
+翻译和编辑文章付出的时间和精力都是值得称赞的。为此,你可以使用共同作者模板来给博客添加多个作者。
+
+```Markdown
+title: "Blog's Title"
+authors:
+  - name: "Author's Name"
+    title: "Author's title"
+    url: "Author's GitHub"
+    image_url: "Author's Image URL"
+  - name: "Translator/Technical Writer's name"
+    url: "Translator/Technical Writer's GitHub"
+    image_url: "Translator/Technical Writer's Image URL"
+keywords:
+- keywords 1
+- keywords 2
+- keywords 3
+- keywords 4
+- keywords 5
+description: Description of the post
+tags: [tag1,tag2,...,tagn]
+```
+
+下面将详细介绍这些字段中的每一个:
+
+##### 作者
+
+这是一个必填字段,当博客是由多人共同撰写时,必须使用这个字段以便表彰作者。 `authors` 字段由以下几部分构成:
+
+- `authors.name`: authors' names in plain text, for example: `name: "John Doe"`.
+- `authors.title`: author's title in plain text, for example: `title: "Technical Writer"`.
+- `authors.url`: authors' GitHub page, for example: `url: "https://github.com/yzeng25"`.
+- `authors.image_url`: author's GitHub avatar, for example: `authors.image_url: "https://avatars.githubusercontent.com/u/36651058?v=4"`.
+
+##### 关键字
+
+这是一个提高 SEO 性能的必要字段。
+
+通常前三个关键字是 "APISIX", "Apache APISIX" 和 "API Gateway"
+, 后两个关键字和博客主题相关。

Review Comment:
   ```suggestion
   通常前三个关键字是 "APISIX", "Apache APISIX" 和 "API Gateway",后两个关键字和博客主题相关。
   ```



##########
website/i18n/zh/docusaurus-plugin-content-docs/current/blog-contributing-guide.md:
##########
@@ -0,0 +1,199 @@
+---
+id: blog
+title: 博客贡献指南
+keywords:
+- API 网关
+- APISIX
+- Apache APISIX
+- 博客
+- 如何写一篇博客
+description: 在 Apache APISIX 网站上撰写或更新博客指南。
+---
+
+在 Apache APISIX 网站上撰写或更新[博客](/blog/)请遵循本篇指南。
+
+如果你对已经发布的博客存有疑问欢迎提交一份 [issue](/docs/general/submit-issue)。如果有意愿的话可以同时创建一个 [PR](/docs/general/contributor-guide/#open-a-pull-request) 自己来修复它。
+
+博客同时以[中文](/zh/blog/)和[英文](/blog/)撰写, 贡献者可以自由的根据自己的喜好选择使用哪种语言,翻译工作会在未来进行并且你也可以 review 相应 PR。
+
+英文博客在 `website/blog` 目录下,根据年月日信息分类。
+
+举个例子,`website/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes.md` 意味着一个名为 `develop-apisix-ingress-with-nocalhost-in-kubernetes.md`
+的博客在2021年11月22号发表,它被存放在 `website/blog/2021/11/22` 目录下。在它完成 review 并合并后,相应的URL会是 `https://apisix.apache.org/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes`。

Review Comment:
   ```suggestion
   举个例子,`website/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes.md` 意味着一个名为 `develop-apisix-ingress-with-nocalhost-in-kubernetes.md` 的博客在2021年11月22号发表,它被存放在 `website/blog/2021/11/22` 目录下。在它完成 review 并合并后,相应的 URL 会是 `https://apisix.apache.org/blog/2021/11/22/develop-apisix-ingress-with-nocalhost-in-kubernetes`。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org