From f5aca904350a52e108464c7ba641d7a0a0d9d108 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Sun, 18 Oct 2009 20:42:54 -0500 Subject: [PATCH] paramaterized layout and page files --- source/_layouts/default.haml | 6 +++++- source/atom.haml | 16 ++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/source/_layouts/default.haml b/source/_layouts/default.haml index cec5376..4df3c39 100644 --- a/source/_layouts/default.haml +++ b/source/_layouts/default.haml @@ -1,3 +1,7 @@ +--- +blog_title: My Blog +--- + !!! 1.1 Transitional %html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en") %head @@ -10,7 +14,7 @@ %body #header .page_width - %a.title(href="/") My Blog + %a.title(href="/")=page.blog_title %ul#header_nav.nav %li.alpha %a(href="/archives") Archives diff --git a/source/atom.haml b/source/atom.haml index d8cfe04..67038c1 100644 --- a/source/atom.haml +++ b/source/atom.haml @@ -1,16 +1,20 @@ --- layout: nil +address: http://yoursite.com +email: author@domain.com +name: Your Name +blog_title: My Blog --- %feed(xmlns="http://www.w3.org/2005/Atom") - %title Your Name - Your Site - %link(href="yoursite.com/atom.xml" rel="self") - %link(href="yoursite.com") + %title= "#{page.name} - #{page.blog_title}" + %link(href="#{page.address}/atom.xml" rel="self") + %link(href="#{page.address}") %updated= Time.now.xmlschema - %id http://yoursite.com/ + %id=page.address %author - %name Your Name - %email user[at]domain.com + %name= page.name + %email= page.email - site.posts[0..14].each do |post| %entry %title= rp(post.title)