Skip to content

Commit cb8f3b4

Browse files
committed
use nanoc blogging
1 parent 71fd1d4 commit cb8f3b4

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

content/changes/2012-9-5-watcher-api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Upcoming Changes to Watcher and Star APIs
3-
published: 2012-9-5
3+
created_at: 2012-9-5
44
author: technoweenie
55
---
66

lib/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# All files in the 'lib' directory will be loaded
22
# before nanoc starts compiling.
3-
include Nanoc::Helpers::Rendering
3+
include Nanoc::Helpers::Rendering, Nanoc::Helpers::Blogging

lib/resources.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ module Helpers
2626
}
2727

2828
def post_date(item)
29-
pub = item[:published]
30-
if !pub.respond_to?(:strftime)
31-
pub = Time.parse(pub)
32-
end
33-
pub.strftime("%B %-d, %Y")
29+
pub = item[:created_at]
30+
attribute_to_time(pub).strftime("%B %-d, %Y")
3431
end
3532

3633
def gravatar_for(login)

0 commit comments

Comments
 (0)