diff --git a/Gemfile b/Gemfile index 620ee45..953c615 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'nanoc', '4.5.4' +gem 'nanoc', '4.7' # General filtering gem 'coffee-script' diff --git a/Gemfile.lock b/Gemfile.lock index be86fbb..177ccad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,14 +12,14 @@ GEM execjs coffee-script-source (1.10.0) colored (1.2) - concurrent-ruby (1.0.4) + concurrent-ruby (1.0.5) cri (2.7.1) colored (~> 1.2) css_press (0.3.2) csspool-st (= 3.1.2) json csspool-st (3.1.2) - ddplugin (1.0.0) + ddplugin (1.0.1) execjs (2.7.0) ffi (1.9.14) formatador (0.2.5) @@ -60,7 +60,7 @@ GEM css_press multi_js (0.1.0) uglifier (~> 2) - nanoc (4.5.4) + nanoc (4.7.0) cri (~> 2.3) ddplugin (~> 1.0) hamster (~> 3.0) @@ -110,7 +110,7 @@ DEPENDENCIES html_press icalendar kramdown - nanoc (= 4.5.4) + nanoc (= 4.7) sass terminal-notifier-guard therubyracer diff --git a/Rules b/Rules index 044de5c..c99641f 100644 --- a/Rules +++ b/Rules @@ -27,7 +27,6 @@ end # compile '/feed.xml' do filter :erb - write '/feed.xml' end # @@ -58,6 +57,7 @@ end compile '/events/**/*', rep: :ical do filter :ical + write ext: 'ics' end # @@ -110,6 +110,7 @@ end # compile '/assets/scripts/**/*.coffee' do filter :coffeescript + write ext: 'js' end ignore '/assets/stylesheets/includes/**/*' @@ -117,6 +118,7 @@ ignore '/assets/stylesheets/includes/**/*' compile '/assets/stylesheets/**/*.scss' do filter :sass, syntax: :scss filter :autoprefixer if production? + write ext: 'css' end # @@ -128,25 +130,12 @@ end # # ASSETS # -route '/assets/stylesheets/**/*' do - "#{item.identifier.without_ext}.css" -end - -route '/assets/scripts/**/*' do - "#{item.identifier.without_ext}.js" -end - # EVENTS -route '/events/**/*', rep: :ical do - "#{item.identifier.without_ext}.ics" +route '/**/index.{erb,html,md}' do + "#{item.identifier.without_ext}.html" end - route '/**/*.{erb,html,md}' do - if item.identifier.without_ext.to_s =~ %r{/index$} - "#{item.identifier.without_ext}.html" - else - "#{item.identifier.without_ext}/index.html" - end + "#{item.identifier.without_ext}/index.html" end # Let anything else simply pass through