From 4221573944c5e69fb7ea7ae6a6f448d23f5ab7ee Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 16 Jan 2015 14:21:12 +0100 Subject: [PATCH] Add jekyll-assets plugin --- Gemfile | 5 ++++ Gemfile.lock | 27 ++++++++++++++++++ .../images/buffered-polyline-1.png | Bin {public => _assets/images}/favicon.ico | Bin {public => _assets/images}/favicon.png | Bin .../installing-erlang-17-0-using-kerl-1.png | Bin _assets/stylesheets/app.css | 5 ++++ {public/css => _assets/stylesheets}/hyde.css | 0 {public/css => _assets/stylesheets}/poole.css | 0 .../css => _assets/stylesheets}/syntax.css | 0 _config.yml | 4 +++ _includes/head.html | 7 ++--- _plugins/ext.rb | 2 ++ _posts/2014-03-23-buffered-polyline.md | 2 +- ...04-12-installing-erlang-17-0-using-kerl.md | 2 +- 15 files changed, 48 insertions(+), 6 deletions(-) rename {public => _assets}/images/buffered-polyline-1.png (100%) rename {public => _assets/images}/favicon.ico (100%) rename {public => _assets/images}/favicon.png (100%) rename {public => _assets}/images/installing-erlang-17-0-using-kerl-1.png (100%) create mode 100644 _assets/stylesheets/app.css rename {public/css => _assets/stylesheets}/hyde.css (100%) rename {public/css => _assets/stylesheets}/poole.css (100%) rename {public/css => _assets/stylesheets}/syntax.css (100%) create mode 100644 _plugins/ext.rb diff --git a/Gemfile b/Gemfile index d0d57ab..63c109c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,8 @@ source 'https://rubygems.org' gem 'jekyll', '~> 2.5.3' + +group :extensions do + gem 'jekyll-assets', '~> 0.12.1' + gem 'yui-compressor', '~> 0.12.0' +end diff --git a/Gemfile.lock b/Gemfile.lock index 074a2a7..7d784f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,7 @@ GEM remote: https://rubygems.org/ specs: + addressable (2.3.6) blankslate (2.1.2.4) celluloid (0.16.0) timers (~> 4.0.0) @@ -13,7 +14,10 @@ GEM colorator (0.1) execjs (2.2.2) fast-stemmer (1.0.2) + fastimage (1.6.6) + addressable (~> 2.3, >= 2.3.5) ffi (1.9.6) + hike (1.2.3) hitimes (1.2.2) jekyll (2.5.3) classifier-reborn (~> 2.0) @@ -30,6 +34,13 @@ GEM redcarpet (~> 3.1) safe_yaml (~> 1.0) toml (~> 0.1.0) + jekyll-assets (0.12.1) + fastimage (~> 1.6) + jekyll (~> 2.0) + sass (~> 3.2) + sprockets (~> 2.10) + sprockets-helpers + sprockets-sass jekyll-coffeescript (1.0.1) coffee-script (~> 2.2) jekyll-gist (1.1.0) @@ -45,26 +56,42 @@ GEM rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) mercenary (0.3.5) + multi_json (1.10.1) parslet (1.5.0) blankslate (~> 2.0) posix-spawn (0.3.9) pygments.rb (0.6.0) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) + rack (1.6.0) rb-fsevent (0.9.4) rb-inotify (0.9.5) ffi (>= 0.5.0) redcarpet (3.2.2) safe_yaml (1.0.4) sass (3.4.9) + sprockets (2.12.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-helpers (1.1.0) + sprockets (~> 2.0) + sprockets-sass (1.3.1) + sprockets (~> 2.0) + tilt (~> 1.1) + tilt (1.4.1) timers (4.0.1) hitimes toml (0.1.2) parslet (~> 1.5.0) yajl-ruby (1.1.0) + yui-compressor (0.12.0) PLATFORMS ruby DEPENDENCIES jekyll (~> 2.5.3) + jekyll-assets (~> 0.12.1) + yui-compressor (~> 0.12.0) diff --git a/public/images/buffered-polyline-1.png b/_assets/images/buffered-polyline-1.png similarity index 100% rename from public/images/buffered-polyline-1.png rename to _assets/images/buffered-polyline-1.png diff --git a/public/favicon.ico b/_assets/images/favicon.ico similarity index 100% rename from public/favicon.ico rename to _assets/images/favicon.ico diff --git a/public/favicon.png b/_assets/images/favicon.png similarity index 100% rename from public/favicon.png rename to _assets/images/favicon.png diff --git a/public/images/installing-erlang-17-0-using-kerl-1.png b/_assets/images/installing-erlang-17-0-using-kerl-1.png similarity index 100% rename from public/images/installing-erlang-17-0-using-kerl-1.png rename to _assets/images/installing-erlang-17-0-using-kerl-1.png diff --git a/_assets/stylesheets/app.css b/_assets/stylesheets/app.css new file mode 100644 index 0000000..8ea4f6a --- /dev/null +++ b/_assets/stylesheets/app.css @@ -0,0 +1,5 @@ +/* + *= require poole + *= require syntax + *= require hyde + */ diff --git a/public/css/hyde.css b/_assets/stylesheets/hyde.css similarity index 100% rename from public/css/hyde.css rename to _assets/stylesheets/hyde.css diff --git a/public/css/poole.css b/_assets/stylesheets/poole.css similarity index 100% rename from public/css/poole.css rename to _assets/stylesheets/poole.css diff --git a/public/css/syntax.css b/_assets/stylesheets/syntax.css similarity index 100% rename from public/css/syntax.css rename to _assets/stylesheets/syntax.css diff --git a/_config.yml b/_config.yml index fcd3f0f..f3d6d29 100644 --- a/_config.yml +++ b/_config.yml @@ -27,6 +27,10 @@ include: [".htaccess"] exclude: ["tmp", "Gemfile", "Gemfile.lock", "Makefile"] # Custom +assets: + gzip: [] + css_compressor: yui + disqus_shortname: blog-kempkens-io footer: diff --git a/_includes/head.html b/_includes/head.html index 5a3cfa5..cb966f5 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -15,13 +15,12 @@ - - - + {% stylesheet app %} - + + diff --git a/_plugins/ext.rb b/_plugins/ext.rb new file mode 100644 index 0000000..b7be7a9 --- /dev/null +++ b/_plugins/ext.rb @@ -0,0 +1,2 @@ +require 'bundler' +Bundler.require(:extensions) diff --git a/_posts/2014-03-23-buffered-polyline.md b/_posts/2014-03-23-buffered-polyline.md index 0838e43..6588c60 100644 --- a/_posts/2014-03-23-buffered-polyline.md +++ b/_posts/2014-03-23-buffered-polyline.md @@ -42,4 +42,4 @@ Since it is nested, you need to call `polygon.coordinates[0]` in order to get ba You could then use the the coordinates to draw the generated polygon on the map (along with the route), in order to produce something like this: -![Buffered Polyline]({{ "public/images/buffered-polyline-1.png" | prepend: site.baseurl }}) +{% image buffered-polyline-1.png %} diff --git a/_posts/2014-04-12-installing-erlang-17-0-using-kerl.md b/_posts/2014-04-12-installing-erlang-17-0-using-kerl.md index 61698cd..86e812a 100644 --- a/_posts/2014-04-12-installing-erlang-17-0-using-kerl.md +++ b/_posts/2014-04-12-installing-erlang-17-0-using-kerl.md @@ -50,4 +50,4 @@ The following `alias` makes it easier to start the Observer from a terminal. The alias erlobserver='erl -sname observer -run observer -detached' {% endhighlight %} -![Erlang Observer]({{ "public/images/installing-erlang-17-0-using-kerl-1.png" || prepend: site.baseurl }}) +{% image installing-erlang-17-0-using-kerl-1.png %}