You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by tamaashu <gi...@git.apache.org> on 2018/11/08 12:45:18 UTC

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

GitHub user tamaashu opened a pull request:

    https://github.com/apache/zookeeper/pull/692

    ZOOKEEPER-3184: Use the same method to generate website as documentation

    With this change we use the same method to generate the website as we do for the documentation.
    This way we would get rid of Jekyll and would not need to install anything besides maven on the build machine(s).
    
    Also replaced the page structure to be able to use BootStrap for CSS, where
    I've got "strong inspiration" from the Apache HBase website.
    
    Change-Id: I94f79298f9ce8f97510ee71c65f857eaa41d59ed

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tamaashu/zookeeper ZOOKEEPER-3184

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/692.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #692
    
----
commit 71c8994e2dfcbf9d2c66f7c0e29b5da04e37a012
Author: Tamas Penzes <ta...@...>
Date:   2018-11-08T12:43:36Z

    ZOOKEEPER-3184: Use the same method to generate website as documentation
    
    With this change we use the same method to generate the website as we do for the documentation.
    This way we would get rid of Jekyll and would not need to install anything besides maven on the build machine(s).
    
    Also replaced the page structure to be able to use BootStrap for CSS, where
    I've got "strong inspiration" from the Apache HBase website.
    
    Change-Id: I94f79298f9ce8f97510ee71c65f857eaa41d59ed

----


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    @lvfangmin How about now?


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    I'm still happy with the changes. Confirmed that we don't need any special approval for website changes. @hanm @lvfangmin any objections?


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by hanm <gi...@git.apache.org>.
Github user hanm commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Nice work @tamaashu ! some feedback:
    
    * The layout is a little bit odd - can we remove the empty spaces on both left and right side of the web page? Use HBase main page for a reference: https://hbase.apache.org/. 
    
    * All links under 'Documentation' dropdown menu is broken.


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Hi @eolivelli, could you please check it again? Since I changed it fundamentally, I think it needs a new review.
    
    @anmolnar, @hanm could you please review these changes?
    
    Thanks.


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu closed the pull request at:

    https://github.com/apache/zookeeper/pull/692


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r234561931
  
    --- Diff: README.md ---
    @@ -1,49 +1,24 @@
     ## Generating the static Apache ZooKeeper website
     
    -In this directory you will find text files formatted using Markdown, with an `.md` suffix.
    +In the `src/main/resources/markdown` 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.
    +Building the site requires [Maven](http://maven.apache.org/) 3.5.0 or newer. 
    +The easiest way to [install Maven](http://maven.apache.org/install.html) depends on your OS.
    +The build process will create a directory called `target/html` containing `index.html` as well as the rest of the
    +compiled directories and files. `target` should not be committed to git as it is generated content.
     
     You can generate the static ZooKeeper website by running:
     
    -1. `jekyll build` in this directory.
    -2. `cp -RP _released_docs _site/doc` - this will include the documentation (see "sub-dir" section below) in the generated site.
    +1. `mvn clean install` in this directory.
    +2. `cp -RP _released_docs _target/html` - this will include the documentation (see "sub-dir" section below) in the generated site.
    --- End diff --
    
    Hi @lvfangmin, thanks for the detailed review.
    
    Yes it is the right page. The documentation links point into the void, since the documentations are generated in a separate process and are manually copied into their final place. Once the generated page is copied into its place the links won't be broken.
    
    The wiki page must be updated after the content will be changed. I've already got my account, so am able to edit it, just wait for the commit of this change.


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r233605749
  
    --- Diff: src/main/resources/markdown/bylaws.md ---
    @@ -1,7 +1,19 @@
    ----
    -layout: page
    -title: Project Bylaws
    ----
    +<!--
    +Copyright 2002-2004 The Apache Software Foundation
    --- End diff --
    
    Do we need this 2002-2004 ?
    I think that this references can be dropped
    
    @hanm ?


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Awesome work
    
    May we rename 'hbase' files to 'zookeeper' ?
    
    Is bootstrap compatible from a licensing perspective? Should we add some 'NOTICE' ?
    



---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by nkalmar <gi...@git.apache.org>.
Github user nkalmar commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    I also like the design, compared to HBase, I can definitely see the inspiration :)
    
    Good job, +1 non-binding


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Committed to `website` branch. Thanks @tamaashu !


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    > Awesome work
    > 
    > May we rename 'hbase' files to 'zookeeper' ?
    
    Even removed them. I've updated to the newest BootStrap, where I've dropped everything I copied from HBase.
     
    > Is bootstrap compatible from a licensing perspective? Should we add some 'NOTICE' ?
    
    BootStrap needs Popper.js and jQuery. All the three have MIT License, which is compatible with Apache 2.0.
    
    https://getbootstrap.com/docs/4.1/about/license/
    https://github.com/FezVrasta/popper.js/blob/master/LICENSE.md
    https://jquery.org/license/
    
    I'll check how to make a NOTICE file.


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    @tamaashu Have you changed the design of the website intentionally?


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Do you have a preview in some staging site?


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r234551644
  
    --- Diff: README.md ---
    @@ -1,49 +1,24 @@
     ## Generating the static Apache ZooKeeper website
     
    -In this directory you will find text files formatted using Markdown, with an `.md` suffix.
    +In the `src/main/resources/markdown` 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.
    +Building the site requires [Maven](http://maven.apache.org/) 3.5.0 or newer. 
    +The easiest way to [install Maven](http://maven.apache.org/install.html) depends on your OS.
    +The build process will create a directory called `target/html` containing `index.html` as well as the rest of the
    +compiled directories and files. `target` should not be committed to git as it is generated content.
     
     You can generate the static ZooKeeper website by running:
     
    -1. `jekyll build` in this directory.
    -2. `cp -RP _released_docs _site/doc` - this will include the documentation (see "sub-dir" section below) in the generated site.
    +1. `mvn clean install` in this directory.
    +2. `cp -RP _released_docs _target/html` - this will include the documentation (see "sub-dir" section below) in the generated site.
    --- End diff --
    
    Thanks for noting it, it was a typo. Fixed.


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by lvfangmin <gi...@git.apache.org>.
Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r234399026
  
    --- Diff: README.md ---
    @@ -1,49 +1,24 @@
     ## Generating the static Apache ZooKeeper website
     
    -In this directory you will find text files formatted using Markdown, with an `.md` suffix.
    +In the `src/main/resources/markdown` 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.
    +Building the site requires [Maven](http://maven.apache.org/) 3.5.0 or newer. 
    +The easiest way to [install Maven](http://maven.apache.org/install.html) depends on your OS.
    +The build process will create a directory called `target/html` containing `index.html` as well as the rest of the
    +compiled directories and files. `target` should not be committed to git as it is generated content.
     
     You can generate the static ZooKeeper website by running:
     
    -1. `jekyll build` in this directory.
    -2. `cp -RP _released_docs _site/doc` - this will include the documentation (see "sub-dir" section below) in the generated site.
    +1. `mvn clean install` in this directory.
    +2. `cp -RP _released_docs _target/html` - this will include the documentation (see "sub-dir" section below) in the generated site.
    --- End diff --
    
    After 'mvn clean install' there is no _target dir but only target, is this a typo or am I missing any step?


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r233793640
  
    --- Diff: src/main/resources/markdown/bylaws.md ---
    @@ -1,7 +1,19 @@
    ----
    -layout: page
    -title: Project Bylaws
    ----
    +<!--
    +Copyright 2002-2004 The Apache Software Foundation
    --- End diff --
    
    2002-2004 can be probably dropped. I'll remove them.


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by lvfangmin <gi...@git.apache.org>.
Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r236063130
  
    --- Diff: README.md ---
    @@ -1,49 +1,24 @@
     ## Generating the static Apache ZooKeeper website
     
    -In this directory you will find text files formatted using Markdown, with an `.md` suffix.
    +In the `src/main/resources/markdown` 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.
    +Building the site requires [Maven](http://maven.apache.org/) 3.5.0 or newer. 
    +The easiest way to [install Maven](http://maven.apache.org/install.html) depends on your OS.
    +The build process will create a directory called `target/html` containing `index.html` as well as the rest of the
    +compiled directories and files. `target` should not be committed to git as it is generated content.
     
     You can generate the static ZooKeeper website by running:
     
    -1. `jekyll build` in this directory.
    -2. `cp -RP _released_docs _site/doc` - this will include the documentation (see "sub-dir" section below) in the generated site.
    +1. `mvn clean install` in this directory.
    +2. `cp -RP _released_docs _target/html` - this will include the documentation (see "sub-dir" section below) in the generated site.
    --- End diff --
    
    Thanks @tamaashu, can you update the readme to point out how to copy those doc? 
    
    One suggest, the top and bottom layout is a bit strange, they're too wide comparing to the main content on that page, can we make those not that wide?


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    Hi @hanm,
    
    > * The layout is a little bit odd - can we remove the empty spaces on both left and right side of the web page? Use HBase main page for a reference: https://hbase.apache.org/.
    
    The layout is quite the same as on https://www.apache.org/ (e.g. https://www.apache.org/licenses/)
    
    > * All links under 'Documentation' dropdown menu is broken.
    
    The documentation is generated in a separate process and has to be copied manually into its place, this is why the links look broken.


---

[GitHub] zookeeper issue #692: ZOOKEEPER-3184: Use the same method to generate websit...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on the issue:

    https://github.com/apache/zookeeper/pull/692
  
    @anmolnar yes. This design is responsive, adopts to the screen size, simple, easy to read, but still modern. It's close to HBase's design, but since I've used 2 version newer bootstrap it differs in a few things. It contains all the data as before with an additional page for events, which is an Apache requirement afaik.


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r233792401
  
    --- Diff: src/main/resources/markdown/bylaws.md ---
    @@ -1,7 +1,19 @@
    ----
    -layout: page
    -title: Project Bylaws
    ----
    +<!--
    +Copyright 2002-2004 The Apache Software Foundation
    --- End diff --
    
    @eolivelli here you can download a tarball: https://drive.google.com/open?id=1GubCh20SPSS6rCi71syA9H9YCILR_D1t


---

[GitHub] zookeeper pull request #692: ZOOKEEPER-3184: Use the same method to generate...

Posted by tamaashu <gi...@git.apache.org>.
Github user tamaashu commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/692#discussion_r236299105
  
    --- Diff: README.md ---
    @@ -1,49 +1,24 @@
     ## Generating the static Apache ZooKeeper website
     
    -In this directory you will find text files formatted using Markdown, with an `.md` suffix.
    +In the `src/main/resources/markdown` 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.
    +Building the site requires [Maven](http://maven.apache.org/) 3.5.0 or newer. 
    +The easiest way to [install Maven](http://maven.apache.org/install.html) depends on your OS.
    +The build process will create a directory called `target/html` containing `index.html` as well as the rest of the
    +compiled directories and files. `target` should not be committed to git as it is generated content.
     
     You can generate the static ZooKeeper website by running:
     
    -1. `jekyll build` in this directory.
    -2. `cp -RP _released_docs _site/doc` - this will include the documentation (see "sub-dir" section below) in the generated site.
    +1. `mvn clean install` in this directory.
    +2. `cp -RP _released_docs _target/html` - this will include the documentation (see "sub-dir" section below) in the generated site.
    --- End diff --
    
    Hi @lvfangmin, done.
    I've set the header and the footer to the same width as the content, and also added a new @media set for larger screens.
    Also updated the README.md with step-by-step guide to update the website.


---