diff --git a/lib/octopress-date-format.rb b/lib/octopress-date-format.rb
index 1fbbba7..761e9dc 100644
--- a/lib/octopress-date-format.rb
+++ b/lib/octopress-date-format.rb
@@ -117,7 +117,11 @@ def datetime(input)
DateFormat.config = site.config
end
- Jekyll::Hooks.register [:page, :post], :post_init do |item|
+ Jekyll::Hooks.register :posts, :pre_render do |item|
+ DateFormat.hack_date(item)
+ end
+
+ Jekyll::Hooks.register :pages, :post_init do |item|
DateFormat.hack_date(item)
end
else
diff --git a/lib/octopress-date-format/version.rb b/lib/octopress-date-format/version.rb
index 73ca795..e8a1702 100644
--- a/lib/octopress-date-format/version.rb
+++ b/lib/octopress-date-format/version.rb
@@ -1,5 +1,5 @@
module Octopress
module DateFormat
- VERSION = "3.0.3"
+ VERSION = "3.0.4"
end
end
diff --git a/test/_expected/2014/07/03/welcome-to-jekyll.html b/test/_expected/2014/07/03/welcome-to-jekyll.html
index 964d2ad..4eb42ef 100644
--- a/test/_expected/2014/07/03/welcome-to-jekyll.html
+++ b/test/_expected/2014/07/03/welcome-to-jekyll.html
@@ -1,6 +1,4 @@
-
-
## Date
- Date: 2014-07-03 14:08:00 +0000
- Formatted Date: Jul 3rd, 2014
diff --git a/test/_expected/index.html b/test/_expected/index.html
index a246052..34d0443 100644
--- a/test/_expected/index.html
+++ b/test/_expected/index.html
@@ -1,7 +1,5 @@
-
-
## Date
- Date: 2014-07-03 14:08:00 +0000
- Formatted Date: Jul 3rd, 2014
@@ -12,17 +10,15 @@
## Updated
-- Date: 2014-07-03 15:03:15 +0000
-- Formatted Date: Jul 3rd, 2014
-- Formatted Time: 3:03 pm
-- XML: 2014-07-03T15:03:15+00:00
-- HTML:
-- Date Time HTML:
-
+- Date: 2014-07-04 16:03:05 +0000
+- Formatted Date: Jul 4th, 2014
+- Formatted Time: 4:03 pm
+- XML: 2014-07-04T16:03:05+00:00
+- HTML:
+- Date Time HTML:
-
## Date
- Date: 2014-07-03 14:08:00 +0000
@@ -34,12 +30,12 @@
## Updated
-- Date: 2014-07-04 16:03:05 +0000
-- Formatted Date: Jul 4th, 2014
-- Formatted Time: 4:03 pm
-- XML: 2014-07-04T16:03:05+00:00
-- HTML:
-- Date Time HTML:
+- Date: 2014-07-03 15:03:15 +0000
+- Formatted Date: Jul 3rd, 2014
+- Formatted Time: 3:03 pm
+- XML: 2014-07-03T15:03:15+00:00
+- HTML:
+- Date Time HTML:
diff --git a/test/_expected/page.html b/test/_expected/page.html
index 3705930..e90df1e 100644
--- a/test/_expected/page.html
+++ b/test/_expected/page.html
@@ -1,6 +1,4 @@
-
-
## Date
- Date: 2013-08-16 14:08:15 +0000
- Formatted Date: Aug 16th, 2013