changeset 182:7a664b44fd8d

Use Bundler for consistent development environment with Jekyll. * README.md: Update documentation for new development workflow * Makefile: Remove custom tool version checks. * _config.yml: Adapt to Bundler workflow. * Gemfile: Document requirements for Bundler. * Gemfile.lock: Document currently used tool versions for Bundler.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Wed, 20 May 2020 14:05:39 +0900
parents 0fe4f2163a9c
children ff5b4e46fe3d
files Gemfile Gemfile.lock Makefile README.md _config.yml
diffstat 5 files changed, 148 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Gemfile	Wed May 20 14:05:39 2020 +0900
@@ -0,0 +1,28 @@
+source "https://rubygems.org"
+
+# Hello! This is where you manage which Jekyll version is used to run.
+# When you want to use a different version, change it below, save the
+# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
+#
+#     bundle exec jekyll serve
+#
+# This will help ensure the proper Jekyll version is running.
+# Happy Jekylling!
+gem "jekyll", "~> 3.8.6"
+
+# If you have any plugins, put them here!
+group :jekyll_plugins do
+  gem "jekyll-feed", "~> 0.6"
+end
+
+gem "pygments.rb"
+
+# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
+# and associated library.
+install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
+  gem "tzinfo", "~> 1.2"
+  gem "tzinfo-data"
+end
+
+# Performance-booster for watching directories on Windows
+gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Gemfile.lock	Wed May 20 14:05:39 2020 +0900
@@ -0,0 +1,77 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.7.0)
+      public_suffix (>= 2.0.2, < 5.0)
+    colorator (1.1.0)
+    concurrent-ruby (1.1.6)
+    em-websocket (0.5.1)
+      eventmachine (>= 0.12.9)
+      http_parser.rb (~> 0.6.0)
+    eventmachine (1.2.7)
+    ffi (1.12.2)
+    forwardable-extended (2.6.0)
+    http_parser.rb (0.6.0)
+    i18n (0.9.5)
+      concurrent-ruby (~> 1.0)
+    jekyll (3.8.7)
+      addressable (~> 2.4)
+      colorator (~> 1.0)
+      em-websocket (~> 0.5)
+      i18n (~> 0.7)
+      jekyll-sass-converter (~> 1.0)
+      jekyll-watch (~> 2.0)
+      kramdown (~> 1.14)
+      liquid (~> 4.0)
+      mercenary (~> 0.3.3)
+      pathutil (~> 0.9)
+      rouge (>= 1.7, < 4)
+      safe_yaml (~> 1.0)
+    jekyll-feed (0.13.0)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-sass-converter (1.5.2)
+      sass (~> 3.4)
+    jekyll-watch (2.2.1)
+      listen (~> 3.0)
+    kramdown (1.17.0)
+    liquid (4.0.3)
+    listen (3.2.1)
+      rb-fsevent (~> 0.10, >= 0.10.3)
+      rb-inotify (~> 0.9, >= 0.9.10)
+    mercenary (0.3.6)
+    multi_json (1.14.1)
+    pathutil (0.16.2)
+      forwardable-extended (~> 2.6)
+    public_suffix (4.0.5)
+    pygments.rb (1.2.1)
+      multi_json (>= 1.0.0)
+    rb-fsevent (0.10.4)
+    rb-inotify (0.10.1)
+      ffi (~> 1.0)
+    rouge (3.19.0)
+    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)
+    thread_safe (0.3.6)
+    tzinfo (1.2.7)
+      thread_safe (~> 0.1)
+    tzinfo-data (1.2020.1)
+      tzinfo (>= 1.0.0)
+    wdm (0.1.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  jekyll (~> 3.8.6)
+  jekyll-feed (~> 0.6)
+  pygments.rb
+  tzinfo (~> 1.2)
+  tzinfo-data
+  wdm (~> 0.1.0)
+
+BUNDLED WITH
+   1.16.1
--- a/Makefile	Wed May 20 13:28:25 2020 +0900
+++ b/Makefile	Wed May 20 14:05:39 2020 +0900
@@ -8,15 +8,12 @@
 
 export CVS_RSH
 
-CHECK_GEM := $(shell command -v gem 2> /dev/null)
-CHECK_JEKYLL := $(shell command -v jekyll 2> /dev/null)
-CHECK_JEKYLL_VERSION = $(shell jekyll --version | grep ^jekyll | sed 's/^.* //g')
-
-deploy: | $(SAVANNAH_DIR) check_prerequisites
+deploy: | $(SAVANNAH_DIR)
 	#
-	# Build static website into the subdirectory `_site` using Jekyll
+	# Build static website into the subdirectory `_site` using Jekyll via
+	# Bundler
 	#
-	jekyll build
+	bundle exec jekyll build
 	#
 	# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 	# DANGEROUS STEP, omitted by default.
@@ -57,18 +54,6 @@
 	# Now everything should be visible to the world.
 	#
 
-check_prerequisites:
-ifndef CHECK_GEM
-	$(error "Command `gem` is not available please install rubygems")
-endif
-ifndef CHECK_JEKYLL
-	$(error "Command `jekyll` is not available. ${CHECK_JEKYLL_VERSION}  Try `gem install jekyll`")
-endif
-ifneq "3.3" "$(word 1, $(sort 3.3 $(CHECK_JEKYLL_VERSION)))"
-	$(error "Detected Jekyll version ${CHECK_JEKYLL_VERSION} (>= 3.3 required).")
-endif
-	@echo "All prerequisites fulfilled."
-
 $(SAVANNAH_DIR):
 	cd .. \
 	&& cvs -z3 -d:ext:$(USRNAME)@cvs.savannah.gnu.org:/web/octave checkout -P octave
--- a/README.md	Wed May 20 13:28:25 2020 +0900
+++ b/README.md	Wed May 20 14:05:39 2020 +0900
@@ -39,51 +39,53 @@
 
 ### Building requisites
 
-To build the static website, you need to install [Jekyll][6] and a few more
-tools from [Rubygems][7].  Just type
+To build the static website, you need to install [Jekyll][6] and [Bundler][7].
+For Debian/Ubuntu please perform the following setup fist.  For other Linux
+distributions this command might change.
+
+    sudo apt-get install ruby-full build-essential zlib1g-dev
+
+Then install the required tools
 
-    gem install jekyll pygments.rb
+    gem install jekyll bundler
 
-A small prerequisite check is performed, by Typing
+From now on, almost everything is handled by Bundler.  Install all required
+dependencies for the static Octave website by running
 
-    make check_prerequisites
+    bundle install
+
+from within the checked-out [hg development repository][2].
 
 For the responsive webpages, we internally use the [Foundation 5][8]
 framework.  All necessary files are already included inside the
 [hg development repository][2].
 
 [6]: https://jekyllrb.com/
-[7]: https://rubygems.org/
+[7]: https://bundler.io/
 [8]: https://foundation.zurb.com/sites/docs/v/5.5.3/
 
 
 
 ### Building the static website locally
 
-All relevant information for Jekyll to build the static website is located
-in the file `_config.yml`.
+All relevant information for Jekyll and Bundler to build the static website are
+located in the files `_config.yml`, `Gemfile`, and `Gemfile.lock`.
 Typing
 
-    jekyll build
+    bundle exec jekyll build
 
 from the repositories root directory will build a complete static website
 into the subdirectory `_site` using this information (this directory is
 ignored by Mercurial and will be created on first build).
 
 Especially for development, it is beneficial to watch the changes locally
-before pushing any changes.
-Jekyll provides a local webserver by typing
+before pushing any changes.  Jekyll provides a local webserver by typing
 
-    jekyll serve
+    bundle exec jekyll serve
 
 and rebuilds the whole static website automatically, as it monitors any
 file changes.
 
-To build the test page, that can be deployed at some subdirectory, e.g.
-`https://www.octave.org/new`, use
-
-    jekyll build --config _config.yml,_config_test.yml
-
 
 
 ### Add a new RSS post
--- a/_config.yml	Wed May 20 13:28:25 2020 +0900
+++ b/_config.yml	Wed May 20 14:05:39 2020 +0900
@@ -1,11 +1,20 @@
 # Welcome to Jekyll!
 #
 # This config file is meant for settings that affect your whole blog, values
-# which you are expected to set up once and rarely need to edit after that.
+# which you are expected to set up once and rarely edit after that. If you find
+# yourself editing this file very often, consider using Jekyll's data files
+# feature for the data you need to update frequently.
+#
 # For technical reasons, this file is *NOT* reloaded automatically when you use
-# 'jekyll serve'. If you change this file, please restart the server process.
+# 'bundle exec jekyll serve'. If you change this file, please restart the server
+# process.
+
 
 # Site settings
+# These are used to personalize your new site. If you look in the HTML files,
+# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
+# You can create any custom variable you would like, and they will be accessible
+# in the templates via {{ site.myvariable }}.
 title: GNU Octave
 email: maintainers@octave.org
 description: > # this means to ignore newlines until "baseurl:"
@@ -27,4 +36,12 @@
 markdown: kramdown
 highlighter: pygments
 
-exclude: ["Makefile"]
+exclude:
+  - Makefile
+  - Gemfile
+  - Gemfile.lock
+  - node_modules
+  - vendor/bundle/
+  - vendor/cache/
+  - vendor/gems/
+  - vendor/ruby/