From aa6564f0387645e0890addeac7f4a651223f46a6 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sun, 27 Jan 2013 17:11:54 -0800 Subject: [PATCH 1/4] Don't catch Exception when parsing YAML frontmatter --- .../lib/middleman-core/core_extensions/front_matter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index 6270868d..cf64f37a 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -70,8 +70,9 @@ module Middleman::CoreExtensions @cache.delete(path) end - YAML_ERRORS = [ Exception, ArgumentError ] + YAML_ERRORS = [ StandardError ] + # https://github.com/tenderlove/psych/issues/23 if defined?(Psych) && defined?(Psych::SyntaxError) YAML_ERRORS << Psych::SyntaxError end From 80c464a96f46cddb512a416c05f1f0e79122aa6d Mon Sep 17 00:00:00 2001 From: Matias Korhonen Date: Thu, 31 Jan 2013 15:57:19 +0200 Subject: [PATCH 2/4] Fixes the Travis CI status image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ada725ea..0261ad8a 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs # Build & Dependency Status -[![Build Status](http://travis-ci.org/middleman/middleman.png)](http://travis-ci.org/middleman/middleman) +[![Build Status](https://travis-ci.org/middleman/middleman.png)](https://travis-ci.org/middleman/middleman) [![Dependency Status](https://gemnasium.com/middleman/middleman.png?travis)](https://gemnasium.com/middleman/middleman) # How to Run Cucumber Tests From cc988ee302cb8aedd5141a036d33e8ca20e9c9fe Mon Sep 17 00:00:00 2001 From: Leon Bogaert Date: Thu, 31 Jan 2013 23:04:49 +0100 Subject: [PATCH 3/4] Added before_render & after_render hook Can be used for pre-processing content --- .../lib/middleman-core/core_extensions/rendering.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/rendering.rb b/middleman-core/lib/middleman-core/core_extensions/rendering.rb index 4f1ade6c..83c5d737 100644 --- a/middleman-core/lib/middleman-core/core_extensions/rendering.rb +++ b/middleman-core/lib/middleman-core/core_extensions/rendering.rb @@ -19,6 +19,9 @@ module Middleman # Include methods app.send :include, InstanceMethods + app.define_hook :before_render + app.define_hook :after_render + # Activate custom renderers require "middleman-core/renderers/erb" app.register Middleman::Renderers::ERb @@ -249,7 +252,10 @@ module Middleman end # Render using Tilt - template.render(context, locs, &block) + run_hook :before_render, template.data, template + content = template.render(context, locs, &block) + run_hook :after_render, content, template + return content ensure # Reset stored buffer @_out_buf = _buf_was From 81acdca5f9672be0e754e69a56175e6f1744df38 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 1 Feb 2013 10:02:43 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0261ad8a..61866dc9 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs # Donate -[![Click here to lend your support to Middleman](https://www.pledgie.com/campaigns/15807.png)](http://www.pledgie.com/campaigns/15807) +[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3) # License