Browse code

paramaterized layout and page files

B Mathis authored on 19/10/2009 at 01:42:54
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+---
2
+blog_title: My Blog
3
+---
4
+
1 5
 !!! 1.1 Transitional
2 6
 %html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en")
3 7
   %head
... ...
@@ -10,7 +14,7 @@
10 10
   %body
11 11
     #header
12 12
       .page_width
13
-        %a.title(href="/") My Blog
13
+        %a.title(href="/")=page.blog_title
14 14
         %ul#header_nav.nav
15 15
           %li.alpha
16 16
             %a(href="/archives") Archives
... ...
@@ -1,16 +1,20 @@
1 1
 ---
2 2
 layout: nil
3
+address: http://yoursite.com
4
+email: author@domain.com
5
+name: Your Name
6
+blog_title: My Blog
3 7
 ---
4 8
 <?xml version="1.0" encoding="utf-8"?>
5 9
 %feed(xmlns="http://www.w3.org/2005/Atom")
6
-  %title Your Name - Your Site
7
-  %link(href="yoursite.com/atom.xml" rel="self")
8
-  %link(href="yoursite.com")
10
+  %title= "#{page.name} - #{page.blog_title}"
11
+  %link(href="#{page.address}/atom.xml" rel="self")
12
+  %link(href="#{page.address}")
9 13
   %updated= Time.now.xmlschema
10
-  %id http://yoursite.com/
14
+  %id=page.address
11 15
   %author
12
-    %name Your Name
13
-    %email user[at]domain.com
16
+    %name= page.name
17
+    %email= page.email
14 18
   - site.posts[0..14].each do |post|
15 19
     %entry
16 20
       %title= rp(post.title)