Repository: zeppelin Updated Branches: refs/heads/gh-pages 9647ba493 -> 97810a07f
Fix download links ### What is this PR for? In recent changes download links were broken on the project website ### What type of PR is it? Hot Fix ### Todos * [x] - update Jekyll version * [x] - update documentation, with `--safe` removed * [x] - add "production" mode flag though `JEKYLL_ENV` aka plusjade/jekyll-bootstrap#84 ### How should this be tested? ``` bundle update JEKYLL_ENV=production bundle exec jekyll serve ``` ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes, it was Author: Alexander Bezzubov <[email protected]> Author: Damien CORNEAU <[email protected]> Author: Alexander <[email protected]> Closes #1410 from bzz/fix-download-links and squashes the following commits: 2b04e4a [Alexander] Merge pull request #11 from corneadoug/fix/otherRenderingIssues f774bb0 [Damien CORNEAU] Add extension to pages_list links 68f4d64 [Damien CORNEAU] Backport https://github.com/plusjade/jekyll-bootstrap/pull/293 09f770e [Alexander Bezzubov] Add missing dependency and update deprecated config f270a43 [Alexander Bezzubov] Update Jekyll in order to use JEKYLL_ENV 45bf884 [Alexander Bezzubov] Backport of plusjade/jekyll-bootstrap#262 for website Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/97810a07 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/97810a07 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/97810a07 Branch: refs/heads/gh-pages Commit: 97810a07fbb0df6e5dcb9c34bdbda6b7e3b220ba Parents: 9647ba4 Author: Alexander Bezzubov <[email protected]> Authored: Wed Sep 7 15:27:14 2016 +0900 Committer: Alexander Bezzubov <[email protected]> Committed: Wed Sep 7 16:32:29 2016 +0900 ---------------------------------------------------------------------- Gemfile | 1 + Gemfile.lock | 174 ++++++++++++++++++++-------- README.md | 8 +- _config.yml | 2 +- _includes/JB/analytics | 4 +- _includes/JB/comments-providers/disqus | 3 +- _includes/JB/is_production | 39 +++++++ _includes/JB/pages_list | 4 +- _includes/JB/setup | 9 +- _includes/JB/sharing | 3 +- 10 files changed, 189 insertions(+), 58 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/Gemfile ---------------------------------------------------------------------- diff --git a/Gemfile b/Gemfile index 655775a..4d63551 100644 --- a/Gemfile +++ b/Gemfile @@ -15,3 +15,4 @@ # source 'https://rubygems.org' gem 'github-pages' +gem 'redcarpet' http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/Gemfile.lock ---------------------------------------------------------------------- diff --git a/Gemfile.lock b/Gemfile.lock index aaccff9..6267b0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,61 +1,141 @@ GEM remote: https://rubygems.org/ specs: - RedCloth (4.2.9) - classifier (1.3.3) - fast-stemmer (>= 1.0.0) - colorator (0.1) - commander (4.1.5) - highline (~> 1.6.11) - fast-stemmer (1.0.2) - ffi (1.9.3) - github-pages (10) - RedCloth (= 4.2.9) - jekyll (= 1.3.0) - kramdown (= 1.2.0) - liquid (= 2.5.4) - maruku (= 0.6.1) - rdiscount (= 2.1.7) - redcarpet (= 2.3.0) - highline (1.6.20) - jekyll (1.3.0) - classifier (~> 1.3) - colorator (~> 0.1) - commander (~> 4.1.3) - liquid (~> 2.5.2) - listen (~> 1.3) - maruku (~> 0.6.0) - pygments.rb (~> 0.5.0) - redcarpet (~> 2.3.0) - safe_yaml (~> 1.0.4) - kramdown (1.2.0) - liquid (2.5.4) - listen (1.3.1) + activesupport (4.2.7) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorator (1.1.0) + ethon (0.9.0) + ffi (>= 1.3.0) + execjs (2.7.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + ffi (1.9.14) + forwardable-extended (2.6.0) + gemoji (2.1.0) + github-pages (94) + activesupport (= 4.2.7) + github-pages-health-check (= 1.2.0) + jekyll (= 3.2.1) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.5.1) + jekyll-gist (= 1.4.0) + jekyll-github-metadata (= 2.0.2) + jekyll-mentions (= 1.2.0) + jekyll-paginate (= 1.1.0) + jekyll-redirect-from (= 0.11.0) + jekyll-sass-converter (= 1.3.0) + jekyll-seo-tag (= 2.0.0) + jekyll-sitemap (= 0.10.0) + jemoji (= 0.7.0) + kramdown (= 1.11.1) + liquid (= 3.0.6) + listen (= 3.0.6) + mercenary (~> 0.3) + minima (= 1.0.1) + rouge (= 1.11.1) + terminal-table (~> 1.4) + github-pages-health-check (1.2.0) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 1.4) + typhoeus (~> 0.7) + html-pipeline (2.4.2) + activesupport (>= 2) + nokogiri (>= 1.4) + i18n (0.7.0) + jekyll (3.2.1) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-feed (0.5.1) + jekyll-gist (1.4.0) + octokit (~> 4.2) + jekyll-github-metadata (2.0.2) + jekyll (~> 3.1) + octokit (~> 4.0) + jekyll-mentions (1.2.0) + activesupport (~> 4.0) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.11.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) + sass (~> 3.2) + jekyll-seo-tag (2.0.0) + jekyll (~> 3.1) + jekyll-sitemap (0.10.0) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + jemoji (0.7.0) + activesupport (~> 4.0) + gemoji (~> 2.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0) + json (1.8.3) + kramdown (1.11.1) + liquid (3.0.6) + listen (3.0.6) rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - rb-kqueue (>= 0.2) - maruku (0.6.1) - syntax (>= 1.0.0) - posix-spawn (0.3.6) - pygments.rb (0.5.4) - posix-spawn (~> 0.3.6) - yajl-ruby (~> 1.1.0) - rb-fsevent (0.9.3) - rb-inotify (0.9.2) + rb-inotify (>= 0.9.7) + mercenary (0.3.6) + mini_portile2 (2.1.0) + minima (1.0.1) + minitest (5.9.0) + multipart-post (2.0.0) + net-dns (0.8.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + pkg-config (1.1.7) + public_suffix (1.5.3) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) - rb-kqueue (0.2.0) - ffi (>= 0.5.0) - rdiscount (2.1.7) - redcarpet (2.3.0) + redcarpet (3.3.3) + rouge (1.11.1) safe_yaml (1.0.4) - syntax (1.0.0) - yajl-ruby (1.1.0) + sass (3.4.22) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + terminal-table (1.7.0) + unicode-display_width (~> 1.1) + thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + unicode-display_width (1.1.0) PLATFORMS ruby DEPENDENCIES github-pages + redcarpet BUNDLED WITH - 1.10.4 + 1.11.2 http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 2a6c31a..3fdc2c1 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,14 @@ See https://help.github.com/articles/using-jekyll-with-pages#installing-jekyll gem install bundler bundle install +### Build FAQ + *On OS X 10.9 you may need to do "xcode-select --install"* +Gem *nokogiri* may confilict with `xz` if you have it installed. See https://github.com/sparklemotion/nokogiri/issues/1483 +The workaround is to uninstall `zx` before doing `bundle insall`. + + ## Run website @@ -23,7 +29,7 @@ See https://help.github.com/articles/using-jekyll-with-pages#installing-jekyll ## Deploy to ASF svnpubsub infra (committers only) 1. generate static website in `./_site` ``` - bundle exec jekyll build --safe + JEKYLL_ENV=production bundle exec jekyll build ``` 2. checkout ASF repo http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_config.yml ---------------------------------------------------------------------- diff --git a/_config.yml b/_config.yml index a2241d9..4921c01 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ permalink: /:categories/:year/:month/:day/:title exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md", "vendor", "node_modules", "scss"] -pygments: true +highlighter: true markdown: redcarpet encoding: utf-8 http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/analytics ---------------------------------------------------------------------- diff --git a/_includes/JB/analytics b/_includes/JB/analytics index 48d87c2..bbb93af 100644 --- a/_includes/JB/analytics +++ b/_includes/JB/analytics @@ -1,4 +1,6 @@ -{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %} +{% include JB/is_production %} + +{% if is_production and site.JB.analytics.provider and page.JB.analytics != false %} {% case site.JB.analytics.provider %} {% when "google_classic" %} http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/comments-providers/disqus ---------------------------------------------------------------------- diff --git a/_includes/JB/comments-providers/disqus b/_includes/JB/comments-providers/disqus index 618a7b7..6343100 100644 --- a/_includes/JB/comments-providers/disqus +++ b/_includes/JB/comments-providers/disqus @@ -1,6 +1,7 @@ <div id="disqus_thread"></div> <script type="text/javascript"> - {% if site.safe == false %}var disqus_developer = 1;{% endif %} + {% include JB/is_production %} + {% if is_production == false %}var disqus_developer = 1;{% endif %} var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname {% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %} /* * * DON'T EDIT BELOW THIS LINE * * */ http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/is_production ---------------------------------------------------------------------- diff --git a/_includes/JB/is_production b/_includes/JB/is_production new file mode 100644 index 0000000..3548f8c --- /dev/null +++ b/_includes/JB/is_production @@ -0,0 +1,39 @@ +{% capture jbcache %}{% comment %} + + Determine whether or not the site is being built in a production environment. + + Parameters: + None. + + Returns: + is_production: [true|false] + jb_prod_env: [development|github|other] + + Examples: + + {% include JB/is_production %} + + {% if is_production != true %} + <h3>This is Private</h3> + <p>I love to watch television in my undies. Don't tell anyone!</p> + {% endif %} + + <h3>This is Public</h3> + <p>I have no unusual quirks.</p> + +{% endcomment %} + +{% assign is_production = false %} +{% assign jb_prod_env = "development" %} + +{% if jekyll.environment != "development" %} + {% assign is_production = true %} + {% assign jb_prod_env = jekyll.environment %} +{% endif %} + +{% if site.github %} + {% assign is_production = true %} + {% assign jb_prod_env = "github" %} +{% endif %} + +{% endcapture %}{% assign jbcache = nil %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/pages_list ---------------------------------------------------------------------- diff --git a/_includes/JB/pages_list b/_includes/JB/pages_list index 181d90f..7856efd 100644 --- a/_includes/JB/pages_list +++ b/_includes/JB/pages_list @@ -28,9 +28,9 @@ Usage: {% for cat in node.group %} {% if cat == group %} {% if page.url == node.url %} - <li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li> + <li class="active"><a href="{{ BASE_PATH }}{{node.url}}.html" class="active">{{node.title}}</a></li> {% else %} - <li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li> + <li><a href="{{ BASE_PATH }}{{node.url}}.html">{{node.title}}</a></li> {% endif %} {% endif %} {% endfor %} http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/setup ---------------------------------------------------------------------- diff --git a/_includes/JB/setup b/_includes/JB/setup index efcd84b..2b0bf70 100644 --- a/_includes/JB/setup +++ b/_includes/JB/setup @@ -2,10 +2,11 @@ <!-- - Dynamically set liquid variables for working with URLs/paths --> + {% include JB/is_production %} {% if site.JB.setup.provider == "custom" %} {% include custom/setup %} {% else %} - {% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %} + {% if is_production and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %} {% assign BASE_PATH = site.JB.BASE_PATH %} {% assign HOME_PATH = site.JB.BASE_PATH %} {% else %} @@ -16,7 +17,7 @@ {% if site.JB.ASSET_PATH %} {% assign ASSET_PATH = site.JB.ASSET_PATH %} {% else %} - {% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ page.theme.name }}{% endcapture %} - {% endif %} + {% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{% if page.theme.name %}{{ page.theme.name }}{% else if %}{{ layout.theme.name }}{% endif %}{% endcapture %} + {% endif %} {% endif %} -{% endcapture %}{% assign jbcache = nil %} \ No newline at end of file +{% endcapture %}{% assign jbcache = nil %} http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97810a07/_includes/JB/sharing ---------------------------------------------------------------------- diff --git a/_includes/JB/sharing b/_includes/JB/sharing index f5b1151..175a001 100644 --- a/_includes/JB/sharing +++ b/_includes/JB/sharing @@ -1,4 +1,5 @@ -{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %} +{% include JB/is_production %} +{% if is_production and site.JB.sharing.provider and page.JB.sharing != false %} {% case site.JB.sharing.provider %} {% when "custom" %}
