<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>data/lib/breadcrumbs.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -30,6 +30,7 @@ data/content/css/coderay.css
 data/content/css/site.css
 data/content/index.txt
 data/layouts/default.rhtml
+data/lib/breadcrumbs.rb
 data/tasks/create.rake
 data/tasks/deploy.rake
 data/tasks/growl.rake</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -6,9 +6,17 @@ Webby
 
 == DESCRIPTION:
 
-Webby is a super fantastic little website management system. It would be called a _content management system_ if it were a bigger kid. But, it's just a runt with a special knack for transforming text. And that's really all it does - manages the legwork of turning text into something else, an *ASCII Alchemist* if you will.
-
-Webby works by combining the contents of a *page* with a *layout* to produce HTML. The layout contains everything common to all the pages - HTML headers, navigation menu, footer, etc. - and the page contains just the information for that page. You can use your favorite markup language to write your pages; Webby supports quite a few.
+Webby is a super fantastic little website management system. It would be
+called a _content management system_ if it were a bigger kid. But, it's
+just a runt with a special knack for transforming text. And that's really
+all it does - manages the legwork of turning text into something else, an
+*ASCII Alchemist* if you will.
+
+Webby works by combining the contents of a *page* with a *layout* to
+produce HTML. The layout contains everything common to all the pages -
+HTML headers, navigation menu, footer, etc. - and the page contains just
+the information for that page. You can use your favorite markup language
+to write your pages; Webby supports quite a few.
 
 Install Webby and try it out!
 
@@ -23,7 +31,11 @@ Install Webby and try it out!
 
 But Wait! There's More!
 
-Webby has a great _autobuild_ feature that continuously generates HTML whenever the *pages* or *layouts* change. The HTML is served up via {heel}[http://copiousfreetime.rubyforge.org/heel/], a static file webserver based on mongrel. Whenever you change a page, you can immediately see those changes without having to run any commands.
+Webby has a great _autobuild_ feature that continuously generates HTML whenever
+the *pages* or *layouts* change. The HTML is served up via
+{heel}[http://copiousfreetime.rubyforge.org/heel/], a static file webserver
+based on mongrel. Whenever you change a page, you can immediately see those
+changes without having to run any commands.
 
    $ rake autobuild
    heel --root output --daemonize
@@ -33,7 +45,11 @@ Webby has a great _autobuild_ feature that continuously generates HTML whenever
    - started at 10:22:57
    creating output/index.html
 
-Webby is not limited to producing HTML. By no means! Do you ever get tired of repeating the same color code &lt;b&gt;#D3C4A2&lt;/b&gt; in your CSS files? Webby can help. Need some customized JavaScript for your website. Webby can help. Anytime you find yourself repeating the same bit of text over and over, then you should be using Webby.
+Webby is not limited to producing HTML. By no means! Do you ever get tired of
+repeating the same color code &lt;b&gt;#D3C4A2&lt;/b&gt; in your CSS files? Webby can help.
+Need some customized JavaScript for your website. Webby can help. Anytime you
+find yourself repeating the same bit of text over and over, then you should be
+using Webby.
 
 == INSTALL:
 </diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -114,7 +114,7 @@ class DB
     # into directories or not
     search = if (dir = opts.delete(:in_directory))
       strategy = if opts.delete(:recursive)
-        lambda { |key| key =~ /^#{Regexp.escape(dir)}(?:\/|$)/ }
+        lambda { |key| key =~ %r/^#{Regexp.escape(dir)}(?:\/|$)/ }
       else
         lambda { |key| key == dir }
       end
@@ -211,6 +211,30 @@ class DB
     ary
   end
 
+  # call-seq:
+  #    parent_of( resource )    =&gt; resource or nil
+  #
+  #  Returns the parent page of the given resource or nil if the resource is
+  #  at the root of the directory structure. The parent is the &quot;index&quot; page
+  #  of the current directory or the next directory up the chain.
+  #
+  def parent_of( page )
+    dir = page.dir
+
+    loop do
+      if @db.has_key? dir
+        parent = @db[dir].find {|p| p.filename == 'index'}
+        return parent unless parent.nil? or parent == page
+      end
+
+      break if dir.empty?
+      dir = ::File.dirname(dir)
+      dir = '' if dir == '.'
+    end
+
+    return
+  end
+
 end  # class DB
 end  # module Webby
 </diff>
      <filename>lib/webby/resources/db.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4fd059bcad22599353db5f768cb2f42ecb8cc67a</id>
    </parent>
  </parents>
  <author>
    <name>Tim Pease</name>
    <email>tim.pease@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/webby/commit/174cd07f04cfaf85359e9235c50f314d115c39a3</url>
  <id>174cd07f04cfaf85359e9235c50f314d115c39a3</id>
  <committed-date>2008-02-23T19:59:37-08:00</committed-date>
  <authored-date>2008-02-23T19:59:37-08:00</authored-date>
  <message>added method to find the parent of any page</message>
  <tree>3c0c0f6bb34d7716f1f53db6dae255639369c873</tree>
  <committer>
    <name>Tim Pease</name>
    <email>tim.pease@gmail.com</email>
  </committer>
</commit>
