We write documents in MD format and convert to HTML using Jekyll. The Jekyll generated HTML gets uploaded to apache SVN and becomes Kylin website. All MD source files are managed in git so all changes and contributors are clearly tracked.
Before you add or edit documentation, please deploy the document compilation environment. We provide two ways:
Install following tools before you add or edit documentation:
First, make sure Ruby and Gem work on your machine
Then, install Jekyll, and required plugins
gem install jekyll jekyll-multiple-languages kramdown rougejekyll 2.5.3 and jekyll-multiple-languages 1.0.8 is the known working version.gem install jekyll --version "=2.5.3" to install a specific version.And optionally any markdown editor you prefer
Below is a gem list that works. Stick to these versions if jekyll installation becomes a problem.
$ gem list ... jekyll (2.5.3) jekyll-coffeescript (1.0.1) jekyll-gist (1.4.0) jekyll-multiple-languages (1.0.8) jekyll-paginate (1.1.0) jekyll-sass-converter (1.4.0) jekyll-watch (1.3.1) json (1.8.1) kramdown (1.9.0) ... rouge (1.10.1) ...
The latest kylin release provides dockerfile, to reduce build complexity using docker and Makefile can call docker command.
$ pwd
/Users/<username>/kylin/website
$ make docker.build
docker build -f Dockerfile -t kylin-document:latest .
Sending build context to Docker daemon 82.44MB
Step 1/3 : FROM jekyll/jekyll:2.5.3
---> e81842c29599
Step 2/3 : RUN gem install jekyll-multiple-languages -v 1.0.11
---> Using cache
---> e9e8b0f1d388
Step 3/3 : RUN gem install rouge -v 3.0.0
---> Using cache
---> 1bd42c6b93c0
Successfully built 1bd42c6b93c0
Successfully tagged kylin-document:latest
$ make runserver
docker run --volume="/Users/<username>/kylin/website:/srv/jekyll" -p 4000:4000 --rm -it kylin-document:latest jekyll server --watch
Configuration file: /srv/jekyll/_config.yml
Source: /srv/jekyll
Destination: /srv/jekyll/_site
Generating...
...
Jekyll is a Ruby script to generate a static HTML website from source text and themes, the HTML is generated before being deployed to the web server. Jekyll also happens to be the engine behind GitHub Pages.
Apache Kylin's website and documentation is using Jekyll to manage and generate final content which avaliable at http://kylin.apache.org.
To draft Chinese version document or translate existing one, just add or copy that doc and name with .cn.md as sufffix. It will generate under /cn folder with same name as html file.
To add other language, please update _config.yml and follow the same pattern as Chinese version.
The Kylin website as the Jekyll source is maintained under the doucment branch.
The menu is managed by Jekyll collection:
--- layout: docs title: How to expamle categories: howto permalink: /docs/howto/howto_example.html version: v0.7.2 since: v0.7.2 ---
change the permalink to exactly link
Then add item to docs.yml like:
- title: How To docs: - howto/howto_contribute - howto/howto_jdbc - howto/howto_example
Open doc with any markdown editor, draft content and preview in local.
Sample Doc:
--- layout: docs title: How to example categories: howto permalink: /docs/howto/howto_example.html version: v0.7.2 since: v0.7.2 --- ## This is example doc The quick brown fox jump over the lazy dog.
All impage please put under images folder, in your document, please using below sample to include image:

Using relative path for site links, for example:
[REST API](docs/development40/rest_api.html).
We are using Rouge to highlight code syntax. check this doc's source code for more detail sample.
You can preview in your markdown editor, to check exactly what it will looks like on website, please run Jekyll from website folder:
jekyll server
Then access http://127.0.0.1:4000 in your browser.
cd websitesvn co https://svn.apache.org/repos/asf/kylin/site _site_site folder is working dir which will be removed anytime by maven or git, please make sure only check out from svn when you want to publish to website.
Before opening a pull request or push to git repo, you can preview changes from your local box with following:
cd websitejekyll s_site to svn website/_sitecd website/_sitesvn statussvn add any new filessvn commit -m 'UPDATE MESSAGE'Within a few minutes, svnpubsub should kick in and you'll be able to see the results at http://kylin.apache.org.