blob: 6c24574dd77fb4e32bc35820d8160ad5154ff229 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Apache Flink: 贡献文档</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/flink.css">
<link rel="stylesheet" href="/css/syntax.css">
<!-- Blog RSS feed -->
<link href="/blog/feed.xml" rel="alternate" type="application/rss+xml" title="Apache Flink Blog: RSS feed" />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- We need to load Jquery in the header for custom google analytics event tracking-->
<script src="/js/jquery.min.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Main content. -->
<div class="container">
<div class="row">
<div id="sidebar" class="col-sm-3">
<!-- Top navbar. -->
<nav class="navbar navbar-default">
<!-- The logo. -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-logo">
<a href="/zh/">
<img alt="Apache Flink" src="/img/flink-header-logo.svg" width="147px" height="73px">
</a>
</div>
</div><!-- /.navbar-header -->
<!-- The navigation links. -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-main">
<!-- First menu section explains visitors what Flink is -->
<!-- What is Stream Processing? -->
<!--
<li><a href="/zh/streamprocessing1.html">What is Stream Processing?</a></li>
-->
<!-- What is Flink? -->
<li><a href="/zh/flink-architecture.html">Apache Flink 是什么?</a></li>
<!-- What is Stateful Functions? -->
<li><a href="/zh/stateful-functions.html">What is Stateful Functions?</a></li>
<!-- Use cases -->
<li><a href="/zh/usecases.html">应用场景</a></li>
<!-- Powered by -->
<li><a href="/zh/poweredby.html">Flink 用户</a></li>
&nbsp;
<!-- Second menu section aims to support Flink users -->
<!-- Downloads -->
<li><a href="/zh/downloads.html">下载</a></li>
<!-- Getting Started -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">教程<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/getting-started/index.html" target="_blank">With Flink <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li><a href="https://ci.apache.org/projects/flink/flink-statefun-docs-release-2.1/getting-started/project-setup.html" target="_blank">With Flink Stateful Functions <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li><a href="/zh/training.html">Training Course</a></li>
</ul>
</li>
<!-- Documentation -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">文档<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://ci.apache.org/projects/flink/flink-docs-release-1.11" target="_blank">Flink 1.11 (Latest stable release) <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li><a href="https://ci.apache.org/projects/flink/flink-docs-master" target="_blank">Flink Master (Latest Snapshot) <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li><a href="https://ci.apache.org/projects/flink/flink-statefun-docs-release-2.1" target="_blank">Flink Stateful Functions 2.1 (Latest stable release) <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li><a href="https://ci.apache.org/projects/flink/flink-statefun-docs-master" target="_blank">Flink Stateful Functions Master (Latest Snapshot) <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
</ul>
</li>
<!-- getting help -->
<li><a href="/zh/gettinghelp.html">获取帮助</a></li>
<!-- Blog -->
<li><a href="/blog/"><b>Flink 博客</b></a></li>
<!-- Flink-packages -->
<li>
<a href="https://flink-packages.org" target="_blank">flink-packages.org <small><span class="glyphicon glyphicon-new-window"></span></small></a>
</li>
&nbsp;
<!-- Third menu section aim to support community and contributors -->
<!-- Community -->
<li><a href="/zh/community.html">社区 &amp; 项目信息</a></li>
<!-- Roadmap -->
<li><a href="/zh/roadmap.html">开发计划</a></li>
<!-- Contribute -->
<li><a href="/zh/contributing/how-to-contribute.html">如何参与贡献</a></li>
<ul class="nav navbar-nav navbar-subnav">
<li >
<a href="/zh/contributing/contribute-code.html">贡献代码</a>
</li>
<li >
<a href="/zh/contributing/reviewing-prs.html">审核 Pull Request</a>
</li>
<li >
<a href="/zh/contributing/code-style-and-quality-preamble.html">代码样式与质量指南</a>
</li>
<li class="active">
<a href="/zh/contributing/contribute-documentation.html">贡献文档</a>
</li>
<li >
<a href="/zh/contributing/docs-style.html">Documentation Style Guide</a>
</li>
<li >
<a href="/zh/contributing/improve-website.html">贡献网站</a>
</li>
</ul>
<!-- GitHub -->
<li>
<a href="https://github.com/apache/flink" target="_blank">Flink on GitHub <small><span class="glyphicon glyphicon-new-window"></span></small></a>
</li>
&nbsp;
<!-- Language Switcher -->
<li>
<a href="/contributing/contribute-documentation.html">English</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-bottom">
<hr />
<!-- Twitter -->
<li><a href="https://twitter.com/apacheflink" target="_blank">@ApacheFlink <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<!-- Visualizer -->
<li class=" hidden-md hidden-sm"><a href="/visualizer/" target="_blank">Plan Visualizer <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<hr />
<li><a href="https://apache.org" target="_blank">Apache Software Foundation <small><span class="glyphicon glyphicon-new-window"></span></small></a></li>
<li>
<style>
.smalllinks:link {
display: inline-block !important; background: none; padding-top: 0px; padding-bottom: 0px; padding-right: 0px; min-width: 75px;
}
</style>
<a class="smalllinks" href="https://www.apache.org/licenses/" target="_blank">License</a> <small><span class="glyphicon glyphicon-new-window"></span></small>
<a class="smalllinks" href="https://www.apache.org/security/" target="_blank">Security</a> <small><span class="glyphicon glyphicon-new-window"></span></small>
<a class="smalllinks" href="https://www.apache.org/foundation/sponsorship.html" target="_blank">Donate</a> <small><span class="glyphicon glyphicon-new-window"></span></small>
<a class="smalllinks" href="https://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a> <small><span class="glyphicon glyphicon-new-window"></span></small>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
<div class="col-sm-9">
<div class="row-fluid">
<div class="col-sm-12">
<h1>贡献文档</h1>
<p>良好的文档对任何类型的软件都至关重要。这对于复杂的软件系统尤其如此,例如 Apache Flink 这样的分布式数据处理引擎。Apache Flink 社区旨在提供简明、精确和完整的文档,并欢迎任何改进 Apache Flink 文档的贡献。</p>
<div class="page-toc">
<ul id="markdown-toc">
<li><a href="#section" id="markdown-toc-section">获取文档资源</a></li>
<li><a href="#section-1" id="markdown-toc-section-1">在开始贡献文档之前…</a></li>
<li><a href="#section-2" id="markdown-toc-section-2">更新或扩展文档</a></li>
<li><a href="#section-3" id="markdown-toc-section-3">中文文档翻译</a></li>
<li><a href="#section-4" id="markdown-toc-section-4">提交你的贡献</a></li>
</ul>
</div>
<h2 id="section">获取文档资源</h2>
<p>Apache Flink 的文档和代码保存在相同的 <a href="http://git-scm.com/">git</a> 仓库中。这样做是为了确保代码和文档可以轻松保持同步。</p>
<p>贡献文档的最简单方法是在 <a href="https://github.com/apache/flink">GitHub 上 Flink 的镜像仓库</a> 页面,通过单击右上角的 fork 按钮讲 Flink 克隆到你自己的 GitHub 帐户中。如果你没有 GitHub 帐户,可以免费创建一个帐户。</p>
<p>接下来,将 fork 的代码克隆到本地计算机。</p>
<div class="highlight"><pre><code>git clone https://github.com/&lt;your-user-name&gt;/flink.git
</code></pre></div>
<p>文档位于 Flink 代码库的 <code>docs/</code> 子目录中。</p>
<h2 id="section-1">在开始贡献文档之前…</h2>
<p>…请确保已经有一个相对应的 <a href="https://issues.apache.org/jira/browse/FLINK">Jira</a> issue 存在了。我们要求所有文档更改都需要关联一个 Jira issue,除了一些微不足道的修复,如拼写错误。</p>
<h2 id="section-2">更新或扩展文档</h2>
<p>Flink 文档是用 <a href="http://daringfireball.net/projects/markdown/">Markdown</a> 编写的。Markdown 是一种轻量级标记语言,可以通过工具转化成 HTML。</p>
<p>为了更新或扩展文档,你必须修改 Markdown (<code>.md</code>) 文件。请通过在预览模式下启动构建脚本来验证你的更改。</p>
<div class="highlight"><pre><code>cd docs
./build_docs.sh -p
</code></pre></div>
<p>该脚本会将 Markdown 文件编译成静态 HTML 页面并在本地启动一个 Web 服务器。在浏览器中打开 <code>http://localhost:4000</code>,查看包含更改文档页面。当你修改并保存 Markdown 文件,然后刷新浏览器,修改过的文档将自动被重新编译和更新。</p>
<p>如果有任何疑问,请在开发者邮件列表随时提问。</p>
<h2 id="section-3">中文文档翻译</h2>
<p>Flink 社区正在同时维护英文和中文文档。所以如果你想要更新或扩展文档,英文和中文文档都需要更新。如果你不熟悉中文,请创建一个用于中文文档翻译的 JIRA 并附上 <code>chinese-translation</code> 的组件名,并与当前JIRA关联起来。如果你熟悉中文,我们鼓励在一个 pull request 中同时更新两边的文档。</p>
<p><em>注意:Flink 社区目前正在翻译中文文档,有部分文档可能还未翻译。如果你正在更新的文档还未翻译,可以简单地将英文改动复制到中文文档中。</em></p>
<p>中文文档与对应的英文文档位于相同的目录下。两种语言的文件名是一样的,只不过中文文档会以 <code>.zh.md</code> 作为后缀。你可以根据英文文档的改动来更新或扩展 <code>.zh.md</code> 文件。如果对应的 <code>.zh.md</code> 文件还未创建,你可以拷贝现有的英文文件,名称以 <code>.zh.md</code> 作为后缀。它将在 <code>/zh</code> 文件夹下生成与英文文档同名的 html 文件。</p>
<h2 id="section-4">提交你的贡献</h2>
<p>Flink 项目通过 <a href="https://github.com/apache/flink">GitHub Mirror</a><a href="https://help.github.com/articles/using-pull-requests">Pull Request</a> 方式接受文档的贡献。Pull request 是一种提供补丁的简单方法,它提供了一个指向包含更改的代码分支的链接。</p>
<p>请按照以下步骤准备和提交 pull request。</p>
<ol>
<li>
<p>将更改提交到本地 git 仓库。提交消息应该以 <code>[FLINK-XXXX]</code> 开头,对应了相关联的 Jira issue。</p>
</li>
<li>
<p>将你提交的贡献推送到 GitHub 上你 fork 的 Flink 仓库中。</p>
<p><code>
git push origin myBranch
</code></p>
</li>
<li>
<p>打开你的 fork 仓库网页(<code>https://github.com/&lt;your-user-name&gt;/flink</code>)并使用 “Create Pull Request” 按钮开始创建 pull request。确保 base fork 是<code>apache/flink master</code>,并且 head fork 是包含更改的分支。再为 pull request 添加一个有意义的描述并创建它。</p>
</li>
</ol>
<p>也可以将补丁(patch)附加到 <a href="https://issues.apache.org/jira/browse/FLINK">Jira</a> issue 上。</p>
</div>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="footer text-center col-sm-12">
<p>Copyright © 2014-2019 <a href="http://apache.org">The Apache Software Foundation</a>. All Rights Reserved.</p>
<p>Apache Flink, Flink®, Apache®, the squirrel logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.</p>
<p><a href="/privacy-policy.html">Privacy Policy</a> &middot; <a href="/blog/feed.xml">RSS feed</a></p>
</div>
</div>
</div><!-- /.container -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js"></script>
<script src="/js/codetabs.js"></script>
<script src="/js/stickysidebar.js"></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-52545728-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>