diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 00000000000..b13821f8018 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_PATH: ".local_ruby_bundle" diff --git a/.gitignore b/.gitignore index e102d475d68..b8fcf2f239c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ target/ .DS_Store .jekyll-cache/ .jekyll-metadata +.local_ruby_bundle diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000000..e233a0557f4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "jekyll", "3.6.3" +gem "rouge", "2.2.1" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..07ab37591fa --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,52 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + colorator (1.1.0) + ffi (1.14.2) + forwardable-extended (2.6.0) + jekyll (3.6.3) + addressable (~> 2.4) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 3) + safe_yaml (~> 1.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-watch (1.5.1) + listen (~> 3.0) + kramdown (1.17.0) + liquid (4.0.3) + listen (3.4.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.3.6) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.6) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) + ffi (~> 1.0) + rouge (2.2.1) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll (= 3.6.3) + rouge (= 2.2.1) + +BUNDLED WITH + 1.17.2 diff --git a/README.md b/README.md index 30fb3c6bddd..3fad336a86c 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,32 @@ 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.3.0 or newer. -The easiest way to install jekyll is via a Ruby Gem. This will create a directory called `site` -containing `index.html` as well as the rest of the compiled directories and files. +Building the site requires [Jekyll](http://jekyllrb.com/docs) +[Rouge](https://github.com/rouge-ruby/rouge). +The easiest way to install the right version of these tools is using the +[Bundler](https://bundler.io/) and running `bundle install` in this directory. -To install Jekyll and its required dependencies, execute `sudo gem install jekyll rouge`. See also https://github.com/apache/spark/blob/master/docs/README.md -You can generate the html website by running `jekyll build` in this directory. Use the `--watch` -flag to have jekyll recompile your files as you save changes. +A site build will update the directories and files in the `site` directory with the generated files. +Using Jekyll via `bundle exec jekyll` locks it to the right version. +So after this you can generate the html website by running `bundle exec jekyll build` in this +directory. Use the `--watch` flag 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 +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 `bundle exec jekyll serve` which runs the web server on port 4000, then visit the site at http://localhost:4000. -Please make sure you always run `jekyll build` after testing your changes with `jekyll serve`, -otherwise you end up with broken links in a few places. +Please make sure you always run `bundle exec jekyll build` after testing your changes with +`bundle exec jekyll serve`, otherwise you end up with broken links in a few places. + +## Updating Jekyll version + +To update `Jekyll` or any other gem please follow these steps: + +1. Update the version in the `Gemfile` +1. Run `bundle update` which updates the `Gemfile.lock` +1. Commit both files ## Docs sub-dir diff --git a/_config.yml b/_config.yml index e07dce97037..d31bcc3700d 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,6 @@ kramdown: entity_output: symbol permalink: none destination: site -exclude: ['README.md','content', 'LICENSE', 'merge_pr.py'] +exclude: ['README.md','content', 'LICENSE', 'merge_pr.py', 'Gemfile', 'Gemfile.lock'] keep_files: ['docs'] url: https://spark.apache.org diff --git a/release-process.md b/release-process.md index db40a5000d1..0e5e5db23bf 100644 --- a/release-process.md +++ b/release-process.md @@ -229,7 +229,7 @@ spark-website directly, otherwise you need to re-build the docs. # Build the latest docs $ git checkout v1.1.1 $ cd docs -$ PRODUCTION=1 jekyll build +$ PRODUCTION=1 bundle exec jekyll build # Copy the new documentation to Apache $ git clone https://github.com/apache/spark-website @@ -262,7 +262,7 @@ pick the release version from the list, then click on "Release Notes". Copy this `spark-2.1.2`. Create a new release post under `releases/_posts` to include this short URL. The date of the post should be the date you create it. -Then run `jekyll build` to update the `site` directory. +Then run `bundle exec jekyll build` to update the `site` directory. After merging the change into the `asf-site` branch, you may need to create a follow-up empty commit to force synchronization between ASF's git and the web site, and also the GitHub mirror. @@ -330,6 +330,6 @@ when the branch is no longer maintained. "2.3.2" will become "2.3.3" when "2.3.3 Once everything is working (website docs, website changes) create an announcement on the website and then send an e-mail to the mailing list. To create an announcement, create a post under -`news/_posts` and then run `jekyll build`. +`news/_posts` and then run `bundle exec jekyll build`. Enjoy an adult beverage of your choice, and congratulations on making a Spark release. diff --git a/site/community.html b/site/community.html index e17ca8f07c8..55246d0df94 100644 --- a/site/community.html +++ b/site/community.html @@ -349,7 +349,7 @@
# Build the latest docs
$ git checkout v1.1.1
$ cd docs
-$ PRODUCTION=1 jekyll build
+$ PRODUCTION=1 bundle exec jekyll build
# Copy the new documentation to Apache
$ git clone https://github.com/apache/spark-website
@@ -455,7 +455,7 @@ Update the Spark Website
spark-2.1.2. Create a new release post under releases/_posts to include this short URL. The date of the post should
be the date you create it.
-Then run jekyll build to update the site directory.
+Then run bundle exec jekyll build to update the site directory.
After merging the change into the asf-site branch, you may need to create a follow-up empty
commit to force synchronization between ASF’s git and the web site, and also the GitHub mirror.
@@ -521,7 +521,7 @@
Create an Announcement
Once everything is working (website docs, website changes) create an announcement on the website
and then send an e-mail to the mailing list. To create an announcement, create a post under
-news/_posts and then run jekyll build.
+news/_posts and then run bundle exec jekyll build.
Enjoy an adult beverage of your choice, and congratulations on making a Spark release.
diff --git a/site/sitemap.xml b/site/sitemap.xml
index cc1f5ada1ee..96f766e56a2 100644
--- a/site/sitemap.xml
+++ b/site/sitemap.xml
@@ -852,27 +852,27 @@
weekly
- https://spark.apache.org/mllib/
+ https://spark.apache.org/graphx/
weekly
- https://spark.apache.org/graphx/
+ https://spark.apache.org/mllib/
weekly
- https://spark.apache.org/sql/
+ https://spark.apache.org/streaming/
weekly
- https://spark.apache.org/screencasts/
+ https://spark.apache.org/news/
weekly
- https://spark.apache.org/news/
+ https://spark.apache.org/screencasts/
weekly
- https://spark.apache.org/streaming/
+ https://spark.apache.org/sql/
weekly
@@ -913,4 +913,4 @@
weekly
-
+
\ No newline at end of file