You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2017/12/01 17:58:47 UTC

[53/57] [abbrv] zookeeper git commit: Added a basic readme file.

Added a basic readme file.


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/b232d44d
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/b232d44d
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/b232d44d

Branch: refs/heads/website
Commit: b232d44dfef1a9bb3b4a9642fcb281ee2f389df8
Parents: 14ea3f4
Author: Patrick Hunt <ph...@apache.org>
Authored: Wed Nov 29 22:27:00 2017 -0800
Committer: Patrick Hunt <ph...@apache.org>
Committed: Wed Nov 29 22:27:00 2017 -0800

----------------------------------------------------------------------
 README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/b232d44d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..446d300
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+## Generating the static Apache ZooKeeper website
+
+In this directory you will find text files formatted using Markdown, with an `.md` suffix.
+
+Building the site requires [Jekyll](http://jekyllrb.com/docs) 3.6.2 or newer. 
+The easiest way to install jekyll is via a Ruby Gem. Jekyll will create a directory called `_site` 
+containing `index.html` as well as the rest of the compiled directories and files. _site should not
+be committed to git as this is the generated content.
+
+To install Jekyll and its required dependencies, execute `sudo gem install jekyll pygments.rb` 
+and `sudo pip install Pygments`. See the Jekyll installation page for more details.
+
+You can generate the static ZooKeeper website by running:
+
+1. `jekyll build` in this directory.
+1. `cp -rp doc _site/.` - this will include the documentation (see "sub-dir" section below) in the generated site.
+
+At this point the contents of _site are "staged" and can be reviewed prior to updating the ZooKeeper
+production website.
+
+During development it may be useful to include the `--watch` flag when building to have jekyll recompile
+your files as you save changes. In addition to generating the site as HTML from the markdown files,
+jekyll can serve the site via a web server. To build the site and run a web server use the command
+`jekyll serve` which runs the web server on port 4000, then visit the site at http://localhost:4000.
+
+
+## Docs sub-dir
+
+The product docs are not generated as part of the website. They are built separately for each release 
+of ZooKeeper from the ZooKeeper source repository.
+
+Typically during a release the versioned documentation will be recreated and should be copied, and committed,
+under the "doc" directory here.
+
+
+## Pygments
+
+We also use [pygments](http://pygments.org) for syntax highlighting in documentation markdown pages.
+
+To mark a block of code in your markdown to be syntax highlighted by `jekyll` during the 
+compile phase, use the following syntax:
+
+    {% highlight java %}
+    // Your code goes here, you can replace java with many other
+    // supported languages too.
+    {% endhighlight %}
+
+ You probably don't need to install that unless you want to regenerate the pygments CSS file. 
+ It requires Python, and can be installed by running `sudo easy_install Pygments`.
\ No newline at end of file