diff --git a/.travis.yml b/.travis.yml index 471920a..f7f035f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ before_install: - echo -e "Host zeus.ugent.be\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - npm install script: -- ZEUS_PRODUCTION=1 bundle exec nanoc -- ZEUS_PRODUCTION=1 bundle exec nanoc check --deploy +- bundle exec nanoc --env=prod +- bundle exec nanoc --env=prod check --deploy after_success: - mv deploy_key ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa -- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && ZEUS_PRODUCTION=1 bundle exec nanoc deploy public' +- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc --env=prod deploy public' diff --git a/Gemfile b/Gemfile index 3500262..e6ab6e6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'nanoc', '4.3.7' +gem 'nanoc', '4.4.1' gem 'kramdown' gem 'coffee-script' gem 'sass' diff --git a/Gemfile.lock b/Gemfile.lock index 791ddf4..184c6f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ GEM specs: adsf (1.2.1) rack (>= 1.0.0) - autoprefixer-rails (6.5.1.1) + autoprefixer-rails (6.5.3) execjs builder (3.2.2) coderay (1.1.1) @@ -28,17 +28,17 @@ GEM shellany (~> 0.0) thor (>= 0.18.1) guard-compat (1.2.1) - guard-nanoc (2.1.0) + guard-nanoc (2.1.1) guard (~> 2.8) guard-compat (~> 1.0) - nanoc (~> 4.0) + nanoc (>= 4.3.8, < 5.0) hamster (3.0.0) concurrent-ruby (~> 1.0) highline (1.7.8) icalendar (2.4.1) json (2.0.2) - kramdown (1.12.0) - libv8 (3.16.14.15) + kramdown (1.13.0) + libv8 (3.16.14.17) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -46,7 +46,7 @@ GEM lumberjack (1.0.10) method_source (0.8.2) mini_portile2 (2.1.0) - nanoc (4.3.7) + nanoc (4.4.1) cri (~> 2.3) hamster (~> 3.0) parallel (~> 1.9) @@ -93,7 +93,7 @@ DEPENDENCIES highline icalendar kramdown - nanoc (= 4.3.7) + nanoc (= 4.4.1) sass terminal-notifier-guard therubyracer diff --git a/lib/helpers/environment.rb b/lib/helpers/environment.rb index 4a33b6f..5e9280e 100644 --- a/lib/helpers/environment.rb +++ b/lib/helpers/environment.rb @@ -1,6 +1,6 @@ module EnvironmentHelper def production? - ENV['ZEUS_PRODUCTION'] + ENV['NANOC_ENV'] == 'prod' end def development? diff --git a/nanoc.yaml b/nanoc.yaml index 00051a2..66ddd4c 100644 --- a/nanoc.yaml +++ b/nanoc.yaml @@ -3,7 +3,11 @@ title: Zeus WPI author_name: '' author_uri: '' -base_url: https://zeus.ugent.be +base_url: http://localhost:3000 + +environments: + prod: + base_url: https://zeus.ugent.be # The syntax to use for patterns in the Rules file. Can be either `"glob"` # (default) or `"legacy"`. The former will enable glob patterns, which behave