...
Install Ruby with RVM (http://rvm.io/)
Info Why use RVM instead of native Ruby? http://code.tutsplus.com/articles/why-you-should-use-rvm--net-19529
Code Block language bash curl -sSL https://get.rvm.io | bash -s stable source ~/.profile rvm install ruby
Use Ruby and Gem (https://rubygems.org/) to install Jekyll
Info How to install Jeklly? https://jekyllrb.com/docs/installation/
Code Block language bash rvm list rvm use ruby gem install jekyll
Clone Eagle Document Site
Code Block language bash git clone https://github.com/apache/incubator-eagle.git cd incubator-eagle git checkout origin/document -b document
Build and Preview Eagle Document Site (url is http://127.0.0.1:4000/ by default)
Code Block $ cd website $ jekyll serve /Users/hao/.rvm/gems/ruby-2.2.0/gems/execjs-2.6.0/lib/execjs/external_runtime.rb:135: warning: Insecure world writable dir /usr/local in PATH, mode 040777 Configuration file: /Users/hao/Workspace/incubator-eagle/website/_config.yml Source: /Users/hao/Workspace/incubator-eagle/website Destination: /Users/hao/Workspace/incubator-eagle/website/_site Generating... done. Auto-regeneration: enabled for '/Users/hao/Workspace/incubator-eagle/website' Configuration file: /Users/hao/Workspace/incubator-eagle/website/_config.yml Server address: http://127.0.0.1:4000/ Server running... press ctrl-c to stop.
How to Write Document
Info |
---|
Before writing documents, please make sure jekyll server running |
Create a new markdown file like https://raw.githubusercontent.com/apache/incubator-eagle/document/website/introduction.md, where following header on the top:
Info Learn more about markdown syntax? https://daringfireball.net/projects/markdown/syntax
Code Block --- layout: doc title: ${document_title, for example "Tutorial"} permalink: ${permalink, for example '/docs/index.html'" --- More Markdown Content Here
Preview : Visit http://127.0.0.1:4000/${permalink}, for example, http://127.0.0.1:4000/docs/index.html
Info With jerkell server running, any changes on the markdown files will trigger the jekyll service to rebuild the site automatically with logs like:
Regenerating: 1 file(s) changed at 2016-04-07 13:03:44 ...done in 0.383916 seconds.
How to Publish