| <!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> |
| |
| |
| |
| <!-- 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> |
| |
| |
| <!-- Third menu section aim to support community and contributors --> |
| |
| <!-- Community --> |
| <li><a href="/zh/community.html">社区 & 项目信息</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 > |
| <a href="/zh/contributing/contribute-documentation.html">贡献文档</a> |
| </li> |
| <li > |
| <a href="/zh/contributing/docs-style.html">Documentation Style Guide</a> |
| </li> |
| <li class="active"> |
| <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> |
| |
| |
| |
| <!-- Language Switcher --> |
| <li> |
| |
| <a href="/contributing/improve-website.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><a href="http://flink.apache.org">Apache Flink 官网</a> 介绍了 Apache Flink 及其社区。包括如下多种用途:</p> |
| |
| <ul> |
| <li>向来访者介绍 Apache Flink 及其特性。</li> |
| <li>鼓励来访者下载并使用 Flink。</li> |
| <li>鼓励来访者与社区进行互动。</li> |
| </ul> |
| |
| <p>我们欢迎任何改进官网的贡献。本文档包含了所有改进 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="#committer-" id="markdown-toc-committer-">Committer 章节</a></li> |
| </ul> |
| |
| </div> |
| |
| <h2 id="section">获取官网源码</h2> |
| |
| <p>Apache Flink 官网的源码托管在专用的 <a href="http://git-scm.com/">git</a> 仓库中,并在 Github 中有一个镜像 <a href="https://github.com/apache/flink-web">https://github.com/apache/flink-web</a>。</p> |
| |
| <p>向官网贡献的最简单方式是通过单击右上角的 fork 按钮,将 [Github 上官网的镜像] (https://github.com/apache/flink-web) 镜像到自己的仓库中。如果没有 Github 帐户,你可以免费创建一个。</p> |
| |
| <p>接下来,把你镜像的仓库克隆到本地机器上。</p> |
| |
| <div class="highlight"><pre><code>git clone https://github.com/<your-user-name>/flink-web.git |
| </code></pre></div> |
| |
| <p><code>flink-web</code> 目录包含了拷贝的仓库。官网的代码位于 <code>asf-site</code> 分支上。运行如下命令切换到 <code>asf-site</code> 分支</p> |
| |
| <div class="highlight"><pre><code>cd flink-web |
| git checkout asf-site |
| </code></pre></div> |
| |
| <h2 id="section-1">目录结构和文件</h2> |
| |
| <p>Flink 的官网是用 <a href="http://daringfireball.net/projects/markdown/">Markdown</a> 所编写。Markdown 是一种轻量级标记语言,可以翻译为 HTML。我们使用 <a href="http://jekyllrb.com/">Jekyll</a> 生成静态 HTML 文件。</p> |
| |
| <p>官网仓库中的目录和文件组织如下:</p> |
| |
| <ul> |
| <li>所有文件以 <code>.md</code> 结尾。这些文件会被转换为静态 HTML 文件。</li> |
| <li>常规目录(不以下划线(<code>_</code>)开头)也包含以 <code>.md</code> 结尾的文件。目录结构最终会反映在生成的 HTML 文件和发布的网站上。</li> |
| <li><code>_posts</code> 目录下包含了所有的博客文章。每个 Markdown 文件是一篇博客。贡献新的博客,请添加一个新的文件。</li> |
| <li><code>_includes/</code> 目录包含可导入的文件,例如导航栏或页脚。</li> |
| <li><code>docs/</code> 目录包含不同版本的 Flink 文档。在 <code>docs/</code> 目录下包含了所有已经发布的版本文档,以及最新的预览版文档。构建脚本负责维护这个目录。</li> |
| <li><code>content/</code> 目录包含所有 Jekyll 生成的静态 HTML 文件。谨记一定要把文件放到该目录下,因为 Apache Infrastructure 会从该目录拉取 HTML 内容。(对于提交者:当推送对该网站仓库的更改时,也请推送 <code>content/</code> 目录的更新)。</li> |
| </ul> |
| |
| <h2 id="section-2">更新文档</h2> |
| |
| <p>可以通过修改已有文档,或新增资源–比如 CSS 文件等方式对网站进行更新。想验证你的修改,可以执行如下命令:</p> |
| |
| <div class="highlight"><pre><code>./build.sh -p |
| </code></pre></div> |
| |
| <p>该脚本会把所有 Markdown 文件转换为 HTML 文件,并启动一个本地 web 服务器。打开浏览器并访问 <code>http://localhost:4000/zh</code> 查看你的修改。当你重新修改并保存文件后,刷新浏览器可以看到最新的内容。</p> |
| |
| <p>或者你可以使用 Docker 进行网站的构建(不增加主机环境):</p> |
| |
| <div class="highlight"><pre><code>docker run --rm --volume="$PWD:/srv/flink-web" --expose=4000 -p 4000:4000 -it ruby:2.5 bash -c 'cd /srv/flink-web && ./build.sh -p' |
| </code></pre></div> |
| |
| <p>如果有任何疑问,欢迎在开发者邮件列表中咨询。</p> |
| |
| <h2 id="section-3">提交你的贡献</h2> |
| |
| <p>Flink 项目通过 <a href="https://github.com/apache/flink-web">GitHub Mirror</a> 以提交 <a href="https://help.github.com/articles/using-pull-requests">Pull Requests</a> 方式接受网站贡献。Pull requests 是一种通过向特定代码分支提交补丁的简单方法。</p> |
| |
| <p>请按以下步骤操作准备并提交 pull request。</p> |
| |
| <ol> |
| <li>将你的更改提交到本地 git 仓库。 <strong>请确保你的提交不包含自动生成的文件(<code>content/</code>目录中的任何文件)。</strong> 如果不是重大重构,请将代码压缩到一个提交中。</li> |
| <li> |
| <p>请将提交推送到 GitHub 上你自己仓库的一个特定分支。</p> |
| |
| <p><code> |
| git push origin myBranch |
| </code></p> |
| </li> |
| <li>打开你镜像的仓库(<code>https://github.com/<your-user-name>/flink-web</code>) 并使用 “Create Pull Request” 按钮开始创建 pull request 取请求。 确保基础分支是<code>apache/flink-web asf-site</code> ,并且 head fork 选择带有更改内容的分支。 为 pull request 提供有意义的描述并提交。</li> |
| </ol> |
| |
| <h2 id="committer-">Committer 章节</h2> |
| |
| <p><strong>本节仅适用于提交者。</strong></p> |
| |
| <h3 class="no_toc" id="asf--git-">ASF 网站的 git 仓库</h3> |
| |
| <p><strong>ASF writable</strong>: https://gitbox.apache.org/repos/asf/flink-web.git</p> |
| |
| <p>有关如何设置 ASF git 仓库凭据的详细信息可以参考 <a href="https://gitbox.apache.org/">链接</a>。</p> |
| |
| <h3 class="no_toc" id="pull-request">合并 pull request</h3> |
| |
| <p>默认所有的修改仅在源文件上完成(对<code>content/</code>目录中自动生成的文件没有修改)。 在推送网站更改之前,请运行构建脚本。</p> |
| |
| <div class="highlight"><pre><code>./build.sh |
| </code></pre></div> |
| |
| <p>将更改添加到<code>content/</code> 目录作为附加提交,并将更改推送到 ASF 基本仓库。</p> |
| |
| <h3 class="no_toc" id="section-4">更新文档目录结构</h3> |
| |
| <p>构建脚本还负责维护<code>docs/</code>目录。 设置 <code>-u</code> 标志以更新文档。 这包括获取 Flink git 仓库中不同版本的文档。</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> · <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> |