From 5c8d0c5884ea310b02ab6b07de18db92c7efd2b9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 5 Jul 2014 12:59:11 +0200 Subject: [PATCH 1/6] activate lsi indexing, speed it up on OS X --- Gemfile | 6 +++++- Gemfile.lock | 15 +++++++++++++++ Gruntfile.js | 3 ++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 82e4126c..fb1fd0e8 100644 --- a/Gemfile +++ b/Gemfile @@ -4,4 +4,8 @@ source "https://rubygems.org" # gem "rails" gem 'jekyll', '1.5.1' gem 'mini_magick', '>=3.6.0' -gem 'fileutils', '>=0.7' \ No newline at end of file +gem 'fileutils', '>=0.7' + +#for faster LSI generation +gem 'narray', :git => "https://github.com/tonyarnold/narray" +gem 'gsl', :git => "https://github.com/tonyarnold/rb-gsl" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 296143f6..42de1f71 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,16 @@ +GIT + remote: https://github.com/tonyarnold/narray + revision: eeb06b030320a222727e41f11a2f0be300f9dd52 + specs: + narray (0.6.0.8) + +GIT + remote: https://github.com/tonyarnold/rb-gsl + revision: 659a95fd9b610c02e38035b956feceb5c29e1ecb + specs: + gsl (1.14.7) + narray (>= 0.5.9) + GEM remote: https://rubygems.org/ specs: @@ -55,5 +68,7 @@ PLATFORMS DEPENDENCIES fileutils (>= 0.7) + gsl! jekyll (= 1.5.1) mini_magick (>= 3.6.0) + narray! diff --git a/Gruntfile.js b/Gruntfile.js index 2c06fdef..299dc3f0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -46,7 +46,8 @@ module.exports = function(grunt){ jekyll: { options: { src : '<%= config.src %>/', - config: './_config.yml' + config: './_config.yml', + lsi: true }, production: { options: { From 1ad1b7fe283cb8de90a24f6721af30cdd31cd25c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 5 Jul 2014 12:59:35 +0200 Subject: [PATCH 2/6] display related posts under each post & link --- Gemfile | 3 ++- .../{related_posts.html => relatedposts.html} | 12 ++++++------ _src/_layouts/link.html | 10 ++++++---- _src/_layouts/post.html | 12 +++++++----- 4 files changed, 21 insertions(+), 16 deletions(-) rename _src/_includes/{related_posts.html => relatedposts.html} (84%) diff --git a/Gemfile b/Gemfile index fb1fd0e8..d7836c1b 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ gem 'jekyll', '1.5.1' gem 'mini_magick', '>=3.6.0' gem 'fileutils', '>=0.7' -#for faster LSI generation +# for faster LSI generation +# from http://tonyarnold.com/2014/03/27/speeding-up-jekylls-latent-semantic-mapping.html gem 'narray', :git => "https://github.com/tonyarnold/narray" gem 'gsl', :git => "https://github.com/tonyarnold/rb-gsl" \ No newline at end of file diff --git a/_src/_includes/related_posts.html b/_src/_includes/relatedposts.html similarity index 84% rename from _src/_includes/related_posts.html rename to _src/_includes/relatedposts.html index 2a550929..c8ee660d 100644 --- a/_src/_includes/related_posts.html +++ b/_src/_includes/relatedposts.html @@ -1,21 +1,21 @@ {% if site.related_posts.size > 1 %} {% endif %} \ No newline at end of file diff --git a/_src/_layouts/link.html b/_src/_layouts/link.html index 54a9ceca..f778c62c 100644 --- a/_src/_layouts/link.html +++ b/_src/_layouts/link.html @@ -3,7 +3,7 @@ layout: base ---
- +
- + {% include entry_meta.html %} - + {% include comments.html %} - + + {% include relatedposts.html %} + \ No newline at end of file diff --git a/_src/_layouts/post.html b/_src/_layouts/post.html index 4e1c94b2..038f21b9 100644 --- a/_src/_layouts/post.html +++ b/_src/_layouts/post.html @@ -3,7 +3,7 @@ layout: base ---
- +

{{ page.title | titlecase }}

@@ -13,14 +13,16 @@ layout: base {% if page.image %} {% picture {{ page.image }} class="teaser" %} {% endif %} - + {{ content }}
- + {% include entry_meta.html %} - + {% include comments.html %} - + + {% include relatedposts.html %} + \ No newline at end of file From 7d55799afe258e1b39e5d348910456ea26a0c0a4 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 5 Jul 2014 13:13:46 +0200 Subject: [PATCH 3/6] style related posts --- _src/_includes/relatedposts.html | 4 ++-- _src/assets/less/content-related.less | 30 +++++++++++++++++++++++++++ _src/assets/less/kremalicious3.less | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 _src/assets/less/content-related.less diff --git a/_src/_includes/relatedposts.html b/_src/_includes/relatedposts.html index c8ee660d..2ac9f019 100644 --- a/_src/_includes/relatedposts.html +++ b/_src/_includes/relatedposts.html @@ -1,14 +1,14 @@ {% if site.related_posts.size > 1 %}