Permalink
Browse files

Update Blog html. Add MemorialDay Blog-Post

  • Loading branch information...
1 parent 131df5d commit 7ededbea492efe2f4730be88c0a57aa280aa9f4b Peter Fitzgibbons committed May 29, 2012
Showing with 37 additions and 12 deletions.
  1. +3 −0 .gitignore
  2. +25 −0 posts/memorial-day-shoes-madness.md
  3. +5 −9 resources/blog_resource.rb
  4. +4 −3 views/blog.html.haml
View
@@ -0,0 +1,3 @@
+# IDEs
+/.idea
+
@@ -0,0 +1,25 @@
+---
+title: "Memorial Day Shoes Madness!"
+slug: "memorial-day-shoes-madness"
+date: 2012-05-29 15:24
+---
+
+Memorial Day Weekend 2012 was a big one for the Shoes community!
+Here's a taste of what was discussed, decided, and built over this one 3-day weekend.
+(Don't you people take a holiday?!)
+
+* Christened "Shoes4" as a fork of shoes/brown_shoes. This is the TDD/Test-First re-design of the Shoes Insoles (internals).
+** Shoes "backends" will be composition-oriented under Shoes namespace, so Shoes::Swt is the first framework.
+* Startup issues fixed for OSX/Linux
+* Bundler gemspec configuration
+* TravisCI integration configured
+* Much MUCH discussion around Namespaces and Mixin-vs-Composition
+
+I am personally really exited about the commitment and effort put forth on this
+"holiday" weekend. I was truly stunned to read my Inbox on Sunday Afternoon and find about
+a dozen discussion emails to read-through. Awesome!
+
+Shoes4 has a great start. Thanks to the team for your continued interest and commitment
+to bring us towards a new pair of Shoes.
+
+-- Peter Fitzgibbons
@@ -1,18 +1,14 @@
require 'metadown'
-$posts = Dir["posts/*"].inject({}) do |hsh, file|
- data = Metadown.render(File.read(file))
-
- hsh[data.metadata["slug"]] = data
-
- hsh
-end
+$posts = Dir["posts/*"].collect do |file|
+ Metadown.render(File.read(file))
+end.sort{|a,b| a.metadata["date"] <=> b.metadata["date"]}.reverse
class BlogResource < Webmachine::Resource
def resource_exists?
return true unless request.path_info[:slug] #index
- @post = $posts[request.path_info[:slug]]
+ @post = $posts.find {|p| p.metadata["slug"] == request.path_info[:slug] }
!@post.nil?
end
@@ -24,7 +20,7 @@ def to_html
:date => @post.metadata["date"]
)
else
- Template.new(:blog).render(:posts => $posts.values)
+ Template.new(:blog).render(:posts => $posts)
end
end
end
@@ -2,7 +2,8 @@
%p Welcome to the Shoes blog! Here's all the posts we have so far:
-%ul
- - posts.each do |post|
- %li <a href="/blog/#{post.metadata['slug']}">#{post.metadata["title"]}</a>
+- posts.each do |post|
+ %h2 <a href="/blog/#{post.metadata['slug']}">#{post.metadata["title"]}</a>
+ %h3= post.metadata["date"]
+ %p= post.output

0 comments on commit 7ededbe

Please sign in to comment.