This is an automated email from the ASF dual-hosted git repository. lide pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris-website.git
The following commit(s) were added to refs/heads/master by this push: new 6924c51 change README.md 6924c51 is described below commit 6924c51113a252181fbdfdb885570e305a236703 Author: lide <l...@baidu.com> AuthorDate: Wed Oct 24 17:55:04 2018 +0800 change README.md --- README.md | 115 +++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 87 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index dec66d3..86d9d5f 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,102 @@ -# Apache Incubator Website +# Doris 网站修改编辑说明 -## Prerequisites +目前第一个版本主要内容来自于 github 的wiki。 -The website is built using JBake and a Groovy template. -The builds for the website do require internet access. +## 1 基本信息 +### 1.1 网站地址 -- Install JBake from http://jbake.org/download.html -- Create an environment variable `JBAKE_HOME` pointing to your JBake installation -- Ensure that you have a JVM locally, e.g. [OpenJDK](http://openjdk.java.net/install/) +<http://doris.apache.org> -## Clone the Source code +<http://doris.incubator.apache.org> -If you have write access to incubator, you should clone it from https://git-wip-us.apache.org/repos/asf/incubator.git -otherwise you can fork from our github mirror https://github.com/apache/incubator and raise a pull request. +### 1.2 网站源码 -## Building & Running the site +<https://github.com/apache/incubator-doris-website> -There is a custom `bake.sh` file that is used to build the website. -You can call it with any of the [arguments you would pass to jbake](http://jbake.org/docs/2.5.1/#bake_command). -The easiest way to use it is to run `./bake.sh -b -s` -This will start up JBake in a watching mode as you make changes it will refresh after a short period of time. -While working with it locally, you'll notice that the site URLs redirect to `incubator.apache.org`; -to change this edit `jbake.properties` and uncomment the line referencing `localhost` +## 2 编辑修改网站 -## Automatic build and publishing - Jenkins Setup +### 2.1 先决条件 -Commits to the `master` branch are automatically checked out and built using `build_site.sh`. +网站是通过 JBake 工具和一个 Groovy 模板建立的。 +因此必须事先安装 JBake 和 JDK。 -The corresponding jenkins job can be found at [https://builds.apache.org/view/H-L/view/Incubator/job/Incubator%20Site/](https://builds.apache.org/view/H-L/view/Incubator/job/Incubator%20Site/) +JBake 工具下载安装地址和相应说明请参考: +<https://jbake.org/download.html> -The result of the website build are pushed to the `asf-site` branch which are then published automatically using `gitwcsub` +### 2.2 下载源码到本地 -## Asciidoctor +github地址: -Most of the pages in the site are written using Asciidoctor. -While it is a form of asciidoc it does have some [syntax differences that are worth reviewing](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) +<https://github.com/apache/incubator-doris-website> + +### 2.3 编辑修改 + +此网站的源码中将内容和模板分开来。 + +网页的形式是通过 templates 中定义的 gsp 文件模板规定的。 + +网页的内容则存放在 pages 目录中。 + +一般编辑修改直接修改 pages 中的文件就行。其中 Documents 菜单中的内容是 pages/guides 中的内容决定的。 + +网站源码中比较重要的目录文件列出如下: + +``` +. +├── README.md // 网站源码的说明 +├── assets // 这里主要是css和图片素材资源 +│ ├── css +│ └── images // 所有的图片:jpg或者png +│ └── apache-incubator-logo.png +├── bake.sh // 本地编译和启动网站脚本 +├── build_site.sh // 自动编译和提交,会调用bake.sh +├── incubator-site-groovy.iml +├── jbake.properties // JBake 属性定义 +├── pages // 网站内容: ad和md分别对应ASCII码文档和markdown文档 +│ ├── community.ad +│ ├── downloads.ad +│ ├── faq.ad +│ ├── guides // 当前的配置下,这个目录下的文件会自动加载,参看menu.gsp +│ │ ├── sql_reference.ad +│ │ └── tutorial.ad +│ ├── index.ad // 主页 +│ └── whoweare.ad +└── templates // 模板所在目录 + ├── archive.gsp + ├── feed.gsp + ├── footer.gsp + ├── guide.gsp + ├── header.gsp + ├── homepage.gsp + ├── menu.gsp // 这个是主菜单配置 + ├── page.gsp + ├── simplepage.gsp // 目前大部分网页依赖的模板 + ├── sitemap.gsp + └── tags.gsp + +``` + +### 2.4 在本地测试 + +通过下面的命令可以编译,并在本地启动网站服务,之后就可以通过 http://localhost:8820/ 访问了。 + +``` +sh bake.sh -b -s . +``` + + +## 3 上线 +### 3.1 提交修改 +上线的源代码必须 push 到 github 下面仓库的 master 分支上去: + +<https://github.com/apache/incubator-doris-website> + +两种方式:自己提交或者提交 pull request + +目前有两个分支:master 和 asf-site +前者是源代码,后者是部署目录。 + +### 3.2 编译和上线 +sh build_site.sh 编译网站自动提交上线,之后就可以查看更新了。 -## Groovy Templates -The site templates are written in groovy scripts. -Even though the files end with `.gsp` they are not GSP files and do not have access to tag libraries. -You can run custom code in them, similar to what is done in [homepage.gsp](templates/homepage.gsp) . --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org