Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/octopress-date-format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/octopress-date-format/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Octopress
module DateFormat
VERSION = "3.0.3"
VERSION = "3.0.4"
end
end
2 changes: 0 additions & 2 deletions test/_expected/2014/07/03/welcome-to-jekyll.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@



## Date
- Date: 2014-07-03 14:08:00 +0000
- Formatted Date: Jul 3rd, 2014
Expand Down
28 changes: 12 additions & 16 deletions test/_expected/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@




## Date
- Date: 2014-07-03 14:08:00 +0000
- Formatted Date: Jul 3rd, 2014
Expand All @@ -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: <time class='updated' datetime='2014-07-03T15:03:15+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>3</span><span class='date-suffix'>rd</span>, <span class='date-year'>2014</span></span></time>
- Date Time HTML: <time class='updated' datetime='2014-07-03T15:03:15+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>3</span><span class='date-suffix'>rd</span>, <span class='date-year'>2014</span></span> <span class='time'>3:03 pm</span></time>

- 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: <time class='updated' datetime='2014-07-04T16:03:05+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>4</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span></time>
- Date Time HTML: <time class='updated' datetime='2014-07-04T16:03:05+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>4</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span> <span class='time'>4:03 pm</span></time>





## Date
- Date: 2014-07-03 14:08:00 +0000
Expand All @@ -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: <time class='updated' datetime='2014-07-04T16:03:05+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>4</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span></time>
- Date Time HTML: <time class='updated' datetime='2014-07-04T16:03:05+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>4</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span> <span class='time'>4:03 pm</span></time>
- 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: <time class='updated' datetime='2014-07-03T15:03:15+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>3</span><span class='date-suffix'>rd</span>, <span class='date-year'>2014</span></span></time>
- Date Time HTML: <time class='updated' datetime='2014-07-03T15:03:15+00:00'><span class='date'><span class='date-month'>Jul</span> <span class='date-day'>3</span><span class='date-suffix'>rd</span>, <span class='date-year'>2014</span></span> <span class='time'>3:03 pm</span></time>



2 changes: 0 additions & 2 deletions test/_expected/page.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@



## Date
- Date: 2013-08-16 14:08:15 +0000
- Formatted Date: Aug 16th, 2013
Expand Down