This is an automated email from the ASF dual-hosted git repository.

volodymyr pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 60c1fa7  Update README.md with information on how to configure env for 
building site and update .gitignore to ignore files left after checkout from 
developing branches
60c1fa7 is described below

commit 60c1fa7ec42acabb89e7da27e10d8d567ae55cf0
Author: Volodymyr Vysotskyi <[email protected]>
AuthorDate: Wed Dec 25 18:16:43 2019 +0200

    Update README.md with information on how to configure env for building site 
and update .gitignore to ignore files left after checkout from developing 
branches
---
 .gitignore   |  25 ++++++-
 README.md    |  97 +++++++++++++++-----------
 js/script.js | 218 +++++++++++++++++++++++++++++------------------------------
 3 files changed, 189 insertions(+), 151 deletions(-)

diff --git a/.gitignore b/.gitignore
index fca57d5..0565b0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,26 @@
 _site/*
 .sass-cache/*
-.DS_Store
+.project
+.buildpath
+.classpath
+.checkstyle
+.settings/
+.idea/
+TAGS
+*.log
+*.lck
+*.iml
+target/
+*.DS_Store
+*.patch
+*~
+git.properties
+contrib/native/client/build/
+contrib/native/client/build/*
+CMakeCache.txt
+CMakeFiles
+Makefile
+cmake_install.cmake
+install_manifest.txt
+*.swp
+exec/jdbc-all/dependency-reduced-pom.xml
diff --git a/README.md b/README.md
index 4127166..29f3566 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,19 @@
 The Apache Drill website is built using [Jekyll](http://jekyllrb.com/).
 
+# Configuring env
+1. Install `ruby`
+2. Install `bundler` and `jekyll` `v2.5.2`:
+```
+gem install bundler jekyll:2.5.2
+```
+3. Install `jekyll-redirect-from` `v0.9.1`:
+```
+gem install jekyll-redirect-from:0.9.1
+```
+4. Install Python v2.7.15.
+
+Please make sure that specific versions of libraries are installed since 
building the site with other versions may cause some issues like including md 
document index into the references, etc.
+
 # Developing and Previewing the Website
 
 To preview the website on your local machine:
@@ -13,52 +27,52 @@ Note that you can skip the first two commands (and only run 
`jekyll serve`) if y
 
 ## One Time Setup for Last-Modified-Date
 
-To automatically add the last-modified-on date, a one-time local setup is 
required:
-
-1.  In your cloned directory of Drill, in drill/.git/hooks, create a file 
named pre-commit (no extension) that contains this script:
-
-          #!/bin/sh
-          # Contents of .git/hooks/pre-commit
-
-          git diff --cached --name-status | grep "^M" | while read a b; do
-            cat $b | sed "/---.*/,/---.*/s/^date:.*$/date: $(date -u 
"+%Y-%m-%d")/" > tmp
-            mv tmp $b
-            git add $b
-          done
+To automatically add the `last-modified-on date`, a one-time local setup is 
required:
 
+1.  In your cloned directory of Drill, in `drill/.git/hooks`, create a file 
named `pre-commit` (no extension) that contains this script:
+```
+#!/bin/sh
+# Contents of .git/hooks/pre-commit
+
+git diff --cached --name-status | grep "^M" | while read a b; do
+  cat $b | sed "/---.*/,/---.*/s/^date:.*$/date: $(date -u "+%Y-%m-%d")/" > tmp
+  mv tmp $b
+  git add $b
+done
+```
 2. Make the file executable.
-
-          chmod +x pre-commit
-
-On any page you create, in addition to the title: and parent:, you now need to 
add date: to the front matter of any file you create. For example:
-
-          ---
-          title: "Configuring Multitenant Resources"
-          parent: "Configuring a Multitenant Cluster"
-          date: 
-          ---
-
+```
+chmod +x pre-commit
+```
+On any page you create, in addition to the title, and `parent:`, you now need 
to add `date:` to the front matter of any file you create. For example:
+```
+---
+title: "Configuring Multitenant Resources"
+parent: "Configuring a Multitenant Cluster"
+date: 
+---
+```
 Do not fill in or alter the date: field. Jekyll and git take care of that when 
you commit the file.  
 
 ## One Time Setup for Redirecting gh-pages
 
-Locally install the jekyll-redirect-from gem:
-
-     gem install jekyll-redirect-from
-
+Locally install the `jekyll-redirect-from` gem:
+```
+gem install jekyll-redirect-from
+```
 On any page you want to redirect, add the redirect_to: and the URL to the 
front matter. For example:
-
-          ---
-          title: "Configuring Multitenant Resources"
-          parent: "Configuring a Multitenant Cluster"
-          date: 
-          redirect_to:
-            - http://<new_url>
-          ---
-
+```
+---
+title: "Configuring Multitenant Resources"
+parent: "Configuring a Multitenant Cluster"
+date: 
+redirect_to:
+  - http://<new_url>
+---
+```
 # Compiling the Website
 
-Once the website is ready, you'll need to compile the site to static HTML so 
that it can then be published to Apache. This is as simple as running the 
`jekyll build` command. The _config-prod.yml configuration file causes a few 
changes to the site:
+Once the website is ready, you'll need to compile the site to static HTML so 
that it can then be published to Apache. This is as simple as running the 
`jekyll build` command. The `_config-prod.yml` configuration file causes a few 
changes to the site:
 
 * The `noindex` meta tag is removed. We want the production site to be indexed 
by search engines, but we don't want the staging site to be indexed.
 * The base URL is set to `/`. The production site is at `/`, whereas the 
staging site is at `/drill` (convenient for previewing on GitHub Pages: 
<http://apache.github.io/drill>).
@@ -66,7 +80,7 @@ Once the website is ready, you'll need to compile the site to 
static HTML so tha
 ```bash
 jekyll build --config _config.yml,_config-prod.yml
 _tools/createdatadocs.py
-jekyll build --config _config.yml,_config-prod.yml
+jekyll serve --config _config.yml,_config-prod.yml
 ```
 
 # Uploading to the Apache Website (Drill Committers Only)
@@ -75,6 +89,7 @@ Apache project websites use a system called svnpubsub for 
publishing. Basically,
 
 ```bash
 git clone -b asf-site https://gitbox.apache.org/repos/asf/drill-site.git 
../drill-site
+rm -rf ../drill-site/*
 cp -R _site/* ../drill-site/
 cd ../drill-site
 git status
@@ -89,9 +104,9 @@ The updates should then be live: <http://drill.apache.org>.
 
 The documentation pages are under `_docs`. Most files, in the YAML front 
matter, have three important parameters:
 
-* title: - This is the title of the page enclosed in quotation marks. Each 
page must have a *unique* title
-* date: - This field is needed for Jekyll to write a last-modified date. 
Initially, leave this field blank.
-* parent - This is the title of the page's parent page. It should be empty for 
top-level sections/guides, and be identical to the title attribute of another 
page in all other cases.
+* `title:` - This is the title of the page enclosed in quotation marks. Each 
page must have a *unique* title
+* `date:` - This field is needed for Jekyll to write a last-modified date. 
Initially, leave this field blank.
+* `parent:` - This is the title of the page's parent page. It should be empty 
for top-level sections/guides, and be identical to the title attribute of 
another page in all other cases.
 
 The name of the file itself doesn't matter except for the alphanumeric order 
of the filenames. Files that share the same parent are ordered 
alphanumerically. Note that the content of parent files is ignored, so add an 
overview/introduction child when needed.
 
diff --git a/js/script.js b/js/script.js
old mode 100755
new mode 100644
index a202349..0b6ac67
--- a/js/script.js
+++ b/js/script.js
@@ -1,109 +1,109 @@
----
----
-var reelPointer = null;
-$(document).ready(function(e) {
-
-  $(".aLeft").click(function() {
-               moveReel("prev");
-       });
-       $(".aRight").click(function() {
-               moveReel("next");
-       });
-
-       if ($("#header .scroller .item").length == 1) {
-
-       } else {
-
-               $("#header .dots, .aLeft, .aRight").css({ display: 'block' });
-               $("#header .scroller .item").each(function(i) {
-                       $("#header .dots").append("<div class='dot'></div>");
-                       $("#header .dots .dot").eq(i).click(function() {
-                               var index = $(this).prevAll(".dot").length;
-                               moveReel(index);
-                       });
-               });
-
-               reelPointer = setTimeout(function() { moveReel(1); },5000);
-       }
-       
-       $("#menu ul li").each(function(index, element) {
-        if ($(this).find("ul").length) {
-                       $(this).addClass("parent");
-               }
-    });
-
-       $("#header .dots .dot:eq(0)").addClass("sel");
-
-       resized();
-
-       $(window).scroll(onScroll);
-
-    var pathname = window.location.pathname;
-    var pathSlashesReplaced = pathname.replace(/\//g, " ");
-    var pathSlashesReplacedNoFirstDash = pathSlashesReplaced.replace(" ","");
-    var newClass = pathSlashesReplacedNoFirstDash.replace(/(\.[\s\S]+)/ig, "");
-       $("body").addClass(newClass);
-    if ( $("body").attr("class") == "")
-    {
-         $("body").addClass("class");
-    }
-});
-
-var reel_currentIndex = 0;
-function resized() {
-
-       var WW = parseInt($(window).width(),10);
-       var IW = (WW < 999) ? 999 : WW;
-       var IH = parseInt($("#header .scroller .item").css("height"),10);
-       var IN = $("#header .scroller .item").length;
-
-       $("#header .scroller").css({ width: (IN * IW)+"px", marginLeft: 
-(reel_currentIndex * IW)+"px" });
-       $("#header .scroller .item").css({ width: IW+"px" });
-
-
-       $("#header .scroller .item").each(function(i) {
-               var th = parseInt($(this).find(".tc").height(),10);
-               var d = IH - th + 25;
-               $(this).find(".tc").css({ top: Math.round(d/2)+"px" });
-       });
-
-       if (WW < 999) $("#menu").addClass("r");
-       else $("#menu").removeClass("r");
-
-       onScroll();
-
-}
-
-function moveReel(direction) {
-
-       if (reelPointer) clearTimeout(reelPointer);
-
-       var IN = $("#header .scroller .item").length;
-       var IW = $("#header .scroller .item").width();
-       if (direction == "next") reel_currentIndex++;
-       else if (direction == "prev") reel_currentIndex--;
-       else reel_currentIndex = direction;
-
-       if (reel_currentIndex >= IN) reel_currentIndex = 0;
-       if (reel_currentIndex < 0) reel_currentIndex = IN-1;
-
-       $("#header .dots .dot").removeClass("sel");
-       $("#header .dots .dot").eq(reel_currentIndex).addClass("sel");
-
-       $("#header .scroller").stop(false,true,false).animate({ marginLeft: 
-(reel_currentIndex * IW)+"px" }, 1000, "easeOutQuart");
-
-       reelPointer = setTimeout(function() { moveReel(1); },5000);
-
-}
-
-function onScroll() {
-       var ST = document.body.scrollTop || document.documentElement.scrollTop;
-       //if ($("#menu.r").length) {
-       //      $("#menu.r").css({ top: ST+"px" });
-       //} else {
-       //      $("#menu").css({ top: "0px" });
-       //}
-
-       if (ST > 400) $("#subhead").addClass("show");
-       else $("#subhead").removeClass("show");
-}
+---
+---
+var reelPointer = null;
+$(document).ready(function(e) {
+
+  $(".aLeft").click(function() {
+               moveReel("prev");
+       });
+       $(".aRight").click(function() {
+               moveReel("next");
+       });
+
+       if ($("#header .scroller .item").length == 1) {
+
+       } else {
+
+               $("#header .dots, .aLeft, .aRight").css({ display: 'block' });
+               $("#header .scroller .item").each(function(i) {
+                       $("#header .dots").append("<div class='dot'></div>");
+                       $("#header .dots .dot").eq(i).click(function() {
+                               var index = $(this).prevAll(".dot").length;
+                               moveReel(index);
+                       });
+               });
+
+               reelPointer = setTimeout(function() { moveReel(1); },5000);
+       }
+       
+       $("#menu ul li").each(function(index, element) {
+        if ($(this).find("ul").length) {
+                       $(this).addClass("parent");
+               }
+    });
+
+       $("#header .dots .dot:eq(0)").addClass("sel");
+
+       resized();
+
+       $(window).scroll(onScroll);
+
+    var pathname = window.location.pathname;
+    var pathSlashesReplaced = pathname.replace(/\//g, " ");
+    var pathSlashesReplacedNoFirstDash = pathSlashesReplaced.replace(" ","");
+    var newClass = pathSlashesReplacedNoFirstDash.replace(/(\.[\s\S]+)/ig, "");
+       $("body").addClass(newClass);
+    if ( $("body").attr("class") == "")
+    {
+         $("body").addClass("class");
+    }
+});
+
+var reel_currentIndex = 0;
+function resized() {
+
+       var WW = parseInt($(window).width(),10);
+       var IW = (WW < 999) ? 999 : WW;
+       var IH = parseInt($("#header .scroller .item").css("height"),10);
+       var IN = $("#header .scroller .item").length;
+
+       $("#header .scroller").css({ width: (IN * IW)+"px", marginLeft: 
-(reel_currentIndex * IW)+"px" });
+       $("#header .scroller .item").css({ width: IW+"px" });
+
+
+       $("#header .scroller .item").each(function(i) {
+               var th = parseInt($(this).find(".tc").height(),10);
+               var d = IH - th + 25;
+               $(this).find(".tc").css({ top: Math.round(d/2)+"px" });
+       });
+
+       if (WW < 999) $("#menu").addClass("r");
+       else $("#menu").removeClass("r");
+
+       onScroll();
+
+}
+
+function moveReel(direction) {
+
+       if (reelPointer) clearTimeout(reelPointer);
+
+       var IN = $("#header .scroller .item").length;
+       var IW = $("#header .scroller .item").width();
+       if (direction == "next") reel_currentIndex++;
+       else if (direction == "prev") reel_currentIndex--;
+       else reel_currentIndex = direction;
+
+       if (reel_currentIndex >= IN) reel_currentIndex = 0;
+       if (reel_currentIndex < 0) reel_currentIndex = IN-1;
+
+       $("#header .dots .dot").removeClass("sel");
+       $("#header .dots .dot").eq(reel_currentIndex).addClass("sel");
+
+       $("#header .scroller").stop(false,true,false).animate({ marginLeft: 
-(reel_currentIndex * IW)+"px" }, 1000, "easeOutQuart");
+
+       reelPointer = setTimeout(function() { moveReel(1); },5000);
+
+}
+
+function onScroll() {
+       var ST = document.body.scrollTop || document.documentElement.scrollTop;
+       //if ($("#menu.r").length) {
+       //      $("#menu.r").css({ top: ST+"px" });
+       //} else {
+       //      $("#menu").css({ top: "0px" });
+       //}
+
+       if (ST > 400) $("#subhead").addClass("show");
+       else $("#subhead").removeClass("show");
+}

Reply via email to