<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>data/content/s5/blank.gif</filename>
    </added>
    <added>
      <filename>data/content/s5/bodybg.gif</filename>
    </added>
    <added>
      <filename>data/content/s5/framing.css</filename>
    </added>
    <added>
      <filename>data/content/s5/iepngfix.htc</filename>
    </added>
    <added>
      <filename>data/content/s5/opera.css</filename>
    </added>
    <added>
      <filename>data/content/s5/outline.css</filename>
    </added>
    <added>
      <filename>data/content/s5/pretty.css</filename>
    </added>
    <added>
      <filename>data/content/s5/print.css</filename>
    </added>
    <added>
      <filename>data/content/s5/s5-core.css</filename>
    </added>
    <added>
      <filename>data/content/s5/slides.css</filename>
    </added>
    <added>
      <filename>data/content/s5/slides.js</filename>
    </added>
    <added>
      <filename>data/templates/blog/month.erb</filename>
    </added>
    <added>
      <filename>data/templates/blog/post.erb</filename>
    </added>
    <added>
      <filename>data/templates/blog/year.erb</filename>
    </added>
    <added>
      <filename>data/templates/presentation.erb</filename>
    </added>
    <added>
      <filename>examples/presentation/Rakefile</filename>
    </added>
    <added>
      <filename>examples/presentation/content/_sample_code.txt</filename>
    </added>
    <added>
      <filename>examples/presentation/content/css/uv/twilight.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/index.txt</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/blank.gif</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/bodybg.gif</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/framing.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/iepngfix.htc</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/opera.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/outline.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/pretty.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/print.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/s5-core.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/slides.css</filename>
    </added>
    <added>
      <filename>examples/presentation/content/s5/slides.js</filename>
    </added>
    <added>
      <filename>examples/presentation/layouts/presentation.rhtml</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/blog.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/build.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/create.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/deploy.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/growl.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/heel.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/setup.rb</filename>
    </added>
    <added>
      <filename>examples/presentation/tasks/validate.rake</filename>
    </added>
    <added>
      <filename>examples/presentation/templates/_partial.erb</filename>
    </added>
    <added>
      <filename>examples/presentation/templates/presentation.erb</filename>
    </added>
    <added>
      <filename>tasks/git.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -29,6 +29,17 @@ data/content/css/blueprint/screen.css
 data/content/css/coderay.css
 data/content/css/site.css
 data/content/index.txt
+data/content/s5/blank.gif
+data/content/s5/bodybg.gif
+data/content/s5/framing.css
+data/content/s5/iepngfix.htc
+data/content/s5/opera.css
+data/content/s5/outline.css
+data/content/s5/pretty.css
+data/content/s5/print.css
+data/content/s5/s5-core.css
+data/content/s5/slides.css
+data/content/s5/slides.js
 data/layouts/default.rhtml
 data/lib/breadcrumbs.rb
 data/tasks/blog.rake
@@ -41,7 +52,37 @@ data/tasks/setup.rb
 data/tasks/validate.rake
 data/templates/_partial.erb
 data/templates/atom_feed.erb
+data/templates/blog/month.erb
+data/templates/blog/post.erb
+data/templates/blog/year.erb
 data/templates/page.erb
+data/templates/presentation.erb
+examples/presentation/Rakefile
+examples/presentation/content/_sample_code.txt
+examples/presentation/content/css/uv/twilight.css
+examples/presentation/content/index.txt
+examples/presentation/content/s5/blank.gif
+examples/presentation/content/s5/bodybg.gif
+examples/presentation/content/s5/framing.css
+examples/presentation/content/s5/iepngfix.htc
+examples/presentation/content/s5/opera.css
+examples/presentation/content/s5/outline.css
+examples/presentation/content/s5/pretty.css
+examples/presentation/content/s5/print.css
+examples/presentation/content/s5/s5-core.css
+examples/presentation/content/s5/slides.css
+examples/presentation/content/s5/slides.js
+examples/presentation/layouts/presentation.rhtml
+examples/presentation/tasks/blog.rake
+examples/presentation/tasks/build.rake
+examples/presentation/tasks/create.rake
+examples/presentation/tasks/deploy.rake
+examples/presentation/tasks/growl.rake
+examples/presentation/tasks/heel.rake
+examples/presentation/tasks/setup.rb
+examples/presentation/tasks/validate.rake
+examples/presentation/templates/_partial.erb
+examples/presentation/templates/presentation.erb
 examples/webby/Rakefile
 examples/webby/content/css/blueprint/print.css
 examples/webby/content/css/blueprint/screen.css
@@ -76,9 +117,11 @@ lib/webby/filters/haml.rb
 lib/webby/filters/markdown.rb
 lib/webby/filters/outline.rb
 lib/webby/filters/sass.rb
+lib/webby/filters/slides.rb
 lib/webby/filters/textile.rb
 lib/webby/filters/tidy.rb
 lib/webby/helpers.rb
+lib/webby/helpers/capture_helper.rb
 lib/webby/helpers/coderay_helper.rb
 lib/webby/helpers/graphviz_helper.rb
 lib/webby/helpers/tag_helper.rb
@@ -102,6 +145,7 @@ lib/webby/stelan/spawner.rb
 lib/webby/utils.rb
 spec/spec.opts
 spec/spec_helper.rb
+spec/webby/helpers/capture_helper_spec.rb
 spec/webby/resources/file_spec.rb
 tasks/ann.rake
 tasks/bones.rake</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ PROJ.url = 'http://webby.rubyforge.org/'
 PROJ.description = paragraphs_of('README.txt', 3).join(&quot;\n\n&quot;)
 PROJ.rubyforge.name = 'webby'
 PROJ.version = Webby::VERSION
-PROJ.release_name = 'Teetering Toddler'
+PROJ.release_name = 'Forgetful Foobar'
 
 PROJ.ruby_opts = %w[-W0]
 PROJ.exclude &lt;&lt; %w(^examples/[^/]+/output ^tasks/archive ^tags$)
@@ -34,9 +34,8 @@ PROJ.ann.email[:port] = 587
 PROJ.ann.text = &lt;&lt;-ANN
 == FUN FACT
 
-La Paz, the capital city of Bolivia, is the highest capital in the
-world at over 17,000 feet (5,181 m).
- 
+TODO: add a new fun fact before next release
+
 == POST SCRIPT
 
 Visit the Webby forum to chat with other Webby-Heads:
@@ -49,7 +48,6 @@ ANN
 depend_on 'directory_watcher'
 depend_on 'heel'
 depend_on 'hpricot'
-depend_on 'htmlentities'
 depend_on 'logging'
 depend_on 'rake'
 depend_on 'rspec'</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 --- 
 title:      Home
-created_at: Tue Aug 21 11:25:06 -0600 2007
+created_at: 2007-08-21 11:25:06.000000 -06:00
 filter:     textile
 --- 
 *Webby* is a 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.</diff>
      <filename>examples/webby/content/index.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 --- 
 title:      Manual
-created_at: Wed Aug 29 08:57:00 -0600 2007
+created_at: 2007-08-29 08:57:00.000000 -06:00
 filter:
   - erb
   - textile</diff>
      <filename>examples/webby/content/manual/index.txt</filename>
    </modified>
    <modified>
      <diff>@@ -189,7 +189,7 @@ end
 &lt;%% end -%&gt;
 &lt;/pre&gt;
 
-&lt;% uv :lang =&gt; 'ruby', :line_numbers =&gt; true, :theme =&gt; 'twilight' do -%&gt;
+&lt;% uv :lang =&gt; &quot;ruby&quot;, :line_numbers =&gt; true, :theme =&gt; 'twilight' do -%&gt;
 # Initializer for the class.
 def initialize( string )
   @str = string</diff>
      <filename>examples/webby/content/reference/index.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 --- 
 title:      Tips &amp; Tricks
-created_at: Wed Aug 29 08:57:11 -0600 2007
+created_at: 2007-08-29 08:57:11.000000 -06:00
 filter:
 - textile
 - outline</diff>
      <filename>examples/webby/content/tips_and_tricks/index.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 --- 
 title:      Tutorial
-created_at: Tue Aug 21 17:02:40 -0600 2007
+created_at: 2007-08-21 17:02:40.000000 -06:00
 filter:     textile
 --- 
 h2. Require</diff>
      <filename>examples/webby/content/tutorial/index.txt</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ Logging::Appender.stdout.layout = Logging::Layouts::Pattern.new(
 module Webby
 
   # :stopdoc:
-  VERSION = '0.8.3'   # :nodoc:
+  VERSION = '0.9.0'   # :nodoc:
   LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
   PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
   # :startdoc:
@@ -55,7 +55,11 @@ module Webby
       :user       =&gt; ENV['USER'] || ENV['USERNAME'],
       :host       =&gt; 'example.com',
       :remote_dir =&gt; '/not/a/valid/dir',
-      :rsync_args =&gt; %w(-av --delete),
+      :rsync_args =&gt; %w(-av),
+
+      # Global options for HAML and SASS
+      :haml_options =&gt; {},
+      :sass_options =&gt; {},
 
       # Options passed to the 'tidy' program when the tidy filter is used
       :tidy_options =&gt; '-indent -wrap 80',
@@ -181,6 +185,18 @@ module Webby
 
     Dir.glob(search_me).sort.each {|rb| require rb}
   end
+
+  # Prints a deprecation warning using the logger. The message states that
+  # the given method is being deprecated. An optional message can be give to
+  # -- somthing nice and fuzzy about a new method or why this one has to go
+  # away; sniff, we'll miss you little buddy.
+  #
+  def self.deprecated( method, message = nil )
+    msg = &quot;'#{method}' has been deprecated&quot;
+    msg &lt;&lt; &quot;\n\t#{message}&quot; unless message.nil?
+    Logging::Logger['Webby'].warn msg
+  end
+
 end  # module Webby
 
 </diff>
      <filename>lib/webby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,17 +42,21 @@ module Filters
         @filters = Array(page.filter)
         @log = Logging::Logger[Webby::Renderer]
         @processed = 0
+        @prev_cursor = nil
       end
       
       def start_for(input)
+        @prev_cursor = @renderer.instance_variable_get(:@_cursor)
         @renderer.instance_variable_set(:@_cursor, self)
         filters.inject(input) do |result, filter|
           handler = Filters[filter]
+          raise ::Webby::Error, &quot;unknown filter '#{filter}'&quot; if handler.nil?
+
           args = [result, self][0, handler.arity]
           handle(filter, handler, *args)
         end
       ensure
-        @renderer.instance_variable_set(:@_cursor, nil)
+        @renderer.instance_variable_set(:@_cursor, @prev_cursor)
       end
       
       # The list of filters yet to be processed</diff>
      <filename>lib/webby/filters.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ try_require 'haml'
 
 # Render text via the Haml library
 Webby::Filters.register :haml do |input, cursor|
-  opts = cursor.page.haml_options || {}
+  opts = ::Webby.site.haml_options.merge(cursor.page.haml_options || {})
   b = cursor.renderer.get_binding
   Haml::Engine.new(input, opts).to_html(b)
 end</diff>
      <filename>lib/webby/filters/haml.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ try_require 'sass'
 
 # Render text via the Sass library (part of Haml)
 Webby::Filters.register :sass do |input, cursor|
-  opts = cursor.page.sass_options || {}
+  opts = ::Webby.site.sass_options.merge(cursor.page.sass_options || {})
   Sass::Engine.new(input, opts).render
 end
 </diff>
      <filename>lib/webby/filters/sass.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,38 +5,84 @@ module Webby::Helpers
 #
 module CaptureHelper
 
+  # Called in pages and partials to store up content for later use. Takes a
+  # string and/or a block. First, the string is evaluated, and then the
+  # block is captured using the capture() helper provided by the template
+  # languages. The two are concatenated together.
+  #
+  # Content is retrieved by calling the method without a string or a block.
+  #
+  # ==== Parameters
+  # obj&lt;Object&gt;:: The key in the conetnt_for hash.
+  # string&lt;String&gt;:: Textual content. Defaults to nil.
+  # &amp;block:: A block to be evaluated and concatenated to string.
+  #
+  # ==== Returns
+  # Any content associated with the key (or nil).
+  #
+  # ==== Example
+  #   content_for(:foo, &quot;Foo&quot;)
+  #   content_for(:foo)             #=&gt; &quot;Foo&quot;
+  #   content_for(:foo, &quot;Bar&quot;)
+  #   content_for(:foo)             #=&gt; &quot;FooBar&quot;
+  #
+  def content_for( obj, string = nil, &amp;block )
+    return @_content_for[obj] unless string || block_given?
 
-  def content_for( name, content = nil, &amp;block )
-    cur = instance_variable_get(&quot;@content_for_#{name}&quot;).to_s
-    new = if block.nil? then content
-          else capture_erb(&amp;block) end
+    cur = @_content_for[obj].to_s
+    new = string.to_s + (block_given? ? capture_erb(&amp;block) : &quot;&quot;)
+    @_content_for[obj] = cur + new
+  end
 
-    new = cur + new.to_s
-    instance_variable_set(&quot;@content_for_#{name}&quot;, new)
+  # Returns true if there is content for the given key. Otherwise returns
+  # false.
+  #
+  # ==== Parameters
+  # obj&lt;Object&gt;:: The key in the conetnt_for hash.
+  #
+  # ==== Example
+  #   content_for(:foo, &quot;Foo&quot;)
+  #   content_for?(:foo)            #=&gt; true
+  #   content_for?(:bar)            #=&gt; false
+  #
+  def content_for?( obj )
+    @_content_for.key?(obj)
   end
 
-  # Provides direct acccess to the buffer for this view context
+  # Deletes any content associated with the given object in the content_for
+  # hash.
   #
   # ==== Parameters
-  # the_binding&lt;Binding&gt;:: The binding to pass to the buffer.
+  # obj&lt;Object&gt;:: The key in the conetnt_for hash.
   #
   # ==== Returns
-  # DOC
-  def _erb_buffer( the_binding )
-    eval(&quot;_erbout&quot;, the_binding, __FILE__, __LINE__)
+  # Any content associated with the key (or nil).
+  #
+  # ==== Example
+  #   content_for(:foo, &quot;Foo&quot;)
+  #   content_for?(:foo)            #=&gt; true
+  #   delete_content_for(:foo)
+  #   content_for?(:foo)            #=&gt; false
+  #
+  def delete_content_for( obj )
+    @_content_for.delete(obj)
   end
 
+  # This method is used to capture content from an ERB filter evaluation. It
+  # is useful to helpers that need to process chunks of data during ERB filter
+  # processing.
+  #
   # ==== Parameters
   # *args:: Arguments to pass to the block.
-  # &amp;block:: The template block to call.
+  # &amp;block:: The ERB block to call.
   #
   # ==== Returns
   # String:: The output of the block.
   #
   # ==== Examples
-  # Capture being used in a .html.erb page:
+  # Capture being used in an ERB page:
   # 
-  #   &lt;% @foo = capture do %&gt;
+  #   &lt;% @foo = capture_erb do %&gt;
   #     &lt;p&gt;Some Foo content!&lt;/p&gt; 
   #   &lt;% end %&gt;
   #
@@ -56,17 +102,36 @@ module CaptureHelper
       data = buffer[pos..-1]
 
       # replace it in the original with empty string
-      buffer[pos..-1] = ''
+      buffer[pos..-1] = &quot;&quot;
 
       data
     end
   end
 
-  # DOC
-  def concat_erb(string, the_binding)
+  # This method is used to concatenate content into the ERB output buffer.
+  # It is usefule to helpers that need to insert transformed text back into
+  # the ERB output buffer.
+  #
+  # ==== Parameters
+  # string&lt;String&gt;:: The string to insert into the ERB output.
+  # the_binding&lt;Binding&gt;:: The binding to pass to the buffer.
+  #
+  def concat_erb( string, the_binding )
     _erb_buffer(the_binding) &lt;&lt; string
   end
 
+  # Provides direct acccess to the ERB buffer in the conext of the binding.
+  #
+  # ==== Parameters
+  # the_binding&lt;Binding&gt;:: The binding to pass to the buffer.
+  #
+  # ==== Returns
+  # The current ERB output buffer.
+  #
+  def _erb_buffer( the_binding )
+    eval(&quot;_erbout&quot;, the_binding, __FILE__, __LINE__)
+  end
+
 end  # module CaptureHelper
 
 register(CaptureHelper)</diff>
      <filename>lib/webby/helpers/capture_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,10 +53,8 @@ module CodeRayHelper
     out &lt;&lt; ::CodeRay.scan(text, lang).html(cr_opts)
     out &lt;&lt; '&lt;/pre&gt;&lt;/div&gt;'
 
-    if @_cursor.remaining_filters.include? 'textile'
-      out.insert 0, &quot;&lt;notextile&gt;\n&quot;
-      out &lt;&lt; &quot;\n&lt;/notextile&gt;&quot;
-    end
+    # put some guards around the output (specifically for textile)
+    out = _guard(out)
 
     concat_erb(out, block.binding)
     return</diff>
      <filename>lib/webby/helpers/coderay_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,12 +119,8 @@ module GraphvizHelper
     IO.popen(cmd, 'w') {|io| io.write text}
     GraphvizHelper.error_check(err)
 
-    # see if we need to put some guards around the output
-    # (specifically for textile)
-    if @_cursor.remaining_filters.include? 'textile'
-      out.insert 0, &quot;&lt;notextile&gt;\n&quot;
-      out &lt;&lt; &quot;\n&lt;/notextile&gt;&quot;
-    end
+    # put some guards around the output (specifically for textile)
+    out = _guard(out)
 
     concat_erb(out, block.binding)
     return</diff>
      <filename>lib/webby/helpers/graphviz_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -116,10 +116,8 @@ module TexImgHelper
     end
     out &lt;&lt; &quot; /&gt;\n&quot;
 
-    if @_cursor.remaining_filters.include? 'textile'
-      out.insert 0, &quot;&lt;notextile&gt;\n&quot;
-      out &lt;&lt; &quot;\n&lt;/notextile&gt;&quot;
-    end
+    # put some guards around the output (specifically for textile)
+    out = _guard(out)
 
     concat_erb(out, block.binding)
     return</diff>
      <filename>lib/webby/helpers/tex_img_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -47,10 +47,8 @@ module UltraVioletHelper
     out &lt;&lt; Uv.parse(text, &quot;xhtml&quot;, lang, line_numbers, theme)
     out &lt;&lt; '&lt;/div&gt;'
 
-    if @_cursor.remaining_filters.include? 'textile'
-      out.insert 0, &quot;&lt;notextile&gt;\n&quot;
-      out &lt;&lt; &quot;\n&lt;/notextile&gt;&quot;
-    end
+    # put some guards around the output (specifically for textile)
+    out = _guard(out)
 
     concat_erb(out, block.binding)
     return</diff>
      <filename>lib/webby/helpers/ultraviolet_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,53 +63,91 @@ class Renderer
     @config = ::Webby.site
 
     @_bindings = []
+    @_content_for = {}
     @log = Logging::Logger[self]
   end
 
   # call-seq:
+  #    render( resource = nil, opts = {} )    =&gt; string
+  #
+  # Render the given resource (a page or a partial) and return the results
+  # as a string. If a resource is not given, then the options hash should
+  # contain the name of a partial to render (:partial =&gt; 'name').
+  #
+  # When a partial name is given, the partial is found by looking in the
+  # directory of the current page being rendered. Otherwise, the full path
+  # to the partial can be given.
+  #
+  # If a :guard option is given as true, then the resulting string will be
+  # protected from processing by subsequent filters. Currently this only
+  # protects against the textile filter.
+  #
+  # When rendering partials, local variables can be passed to the partial by
+  # setting them in hash passed as the :locals option.
+  #
+  # ==== Options
+  # :partial&lt;String&gt;::
+  #   The partial to render
+  # :locals&lt;Hash&gt;::
+  #   Locals values to define when rendering a partial
+  # :guard&lt;Boolean&gt;::
+  #   Prevents the resulting string from being processed by subsequent
+  #   filters (only textile for now)
+  # 
+  # ==== Returns
+  # A string that is the rendered page or partial.
+  #
+  # ==== Examples
+  #    # render the partial &quot;foo&quot; using the given local variables
+  #    render( :partial =&gt; &quot;foo&quot;, :locals =&gt; {:bar =&gt; &quot;value for bar&quot;} )
+  #
+  #    # find another page and render it into this page and protect the
+  #    # resulting contents from further filters
+  #    page = @pages.find( :title =&gt; &quot;Chicken Coop&quot; )
+  #    render( page, :guard =&gt; true )
+  #
+  #    # find a partial and render it using the given local variables
+  #    partial = @partials.find( :filename =&gt; &quot;foo&quot;, :in_directory =&gt; &quot;/path&quot; )
+  #    render( partial, :locals =&gt; {:baz =&gt; &quot;baztastic&quot;} )
+  #
+  def render( *args )
+    opts = Hash === args.last ? args.pop : {}
+    resource = args.first
+    resource = _find_partial(opts[:partial]) if resource.nil?
+
+    str = case resource
+      when Resources::Page
+        ::Webby::Renderer.new(resource)._render_page
+      when Resources::Partial
+        _render_partial(resource, opts)
+      else
+        raise ::Webby::Error, &quot;expecting a page or a partial but got '#{resource.class.name}'&quot;
+      end
+
+    str = _guard(str) if opts[:guard]
+    str
+  end
+
+  # call-seq:
   #    render_page    =&gt; string
   #
-  # Apply the desired filters to the page. The filters to apply are
-  # determined from the page's meta-data.
+  # This method is being deprecated. It is being made internal to the
+  # framework and really shouldn't be used anymore.
   #
   def render_page
-    _track_rendering(@page.path) {
-      Filters.process(self, @page, ::Webby::Resources::File.read(@page.path))
-    }
+    Webby.deprecated &quot;render_page&quot;, &quot;this method is being made internal to the framework&quot;
+    _render_page
   end
 
   # call-seq:
   #    render_partial( partial, :locals =&gt; {} )    =&gt; string
   #
-  # Render the given _partial_ into the current page. The _partial_ can
-  # either be the name of the partial to render or a Partial object.
-  #
-  # In the former case, the partial is found by first looking in the
-  # directory of the current for a partial of the same name. Failing that,
-  # the search is expanded to include all directories in the site. The first
-  # partial with a matching name is returned.
-  #
-  # In the latter case, Partial objects can be found by using the +find+
-  # method of the &lt;tt&gt;@partials&lt;/tt&gt; database hash. Please refer to
-  # Webby::Resources::DB#find method for more information.
+  # This method is being deprecated. Please use the +render+ method instead.
   #
   def render_partial( part, opts = {} )
-    part = case part
-      when String
-        fn = '_' + part
-        p = Resources.partials.find(
-            :filename =&gt; fn, :in_directory =&gt; @page.dir ) rescue nil
-        p ||= Resources.partials.find(:filename =&gt; fn)
-        raise ::Webby::Error, &quot;could not find partial '#{part}'&quot; if p.nil?
-        p
-      when ::Webby::Resources::Partial
-        part
-      else raise ::Webby::Error, &quot;expecting a partial or a partial name&quot; end
-
-    _track_rendering(part.path) {
-      _configure_locals(opts[:locals])
-      Filters.process(self, part, ::Webby::Resources::File.read(part.path))
-    }
+    Webby.deprecated &quot;render_partial&quot;, &quot;it is being replaced by the Renderer#render() method&quot;
+    opts[:partial] = part
+    render opts
   end
 
   # call-seq:
@@ -143,8 +181,31 @@ class Renderer
     @_bindings.last
   end
 
+  # call-seq:
+  #    _render_page    =&gt; string
+  #
+  # Apply the desired filters to the page. The filters to apply are
+  # determined from the page's meta-data.
+  #
+  def _render_page
+    _track_rendering(@page.path) {
+      Filters.process(self, @page, ::Webby::Resources::File.read(@page.path))
+    }
+  end
 
-  private
+  # call-seq:
+  #    _render_partial( partial, :locals =&gt; {} )    =&gt; string
+  #
+  # Render the given _partial_ into the current page. The :locals are a hash
+  # of key / value pairs that will be set as local variables in the scope of
+  # the partial when it is rendered.
+  #
+  def _render_partial( part, opts = {} )
+    _track_rendering(part.path) {
+      _configure_locals(opts[:locals])
+      Filters.process(self, part, ::Webby::Resources::File.read(part.path))
+    }
+  end
 
   # call-seq:
   #    _layout_page    =&gt; string
@@ -155,7 +216,7 @@ class Renderer
   # page's meta-data.
   #
   def _layout_page
-    @content = @page.render(self)
+    @content = _render_page
 
     _track_rendering(@page.path) {
       _render_layout_for(@page)
@@ -261,6 +322,47 @@ class Renderer
     end
   end
 
+  # Attempts to locate a partial by name. If only the partial name is given,
+  # then the current directory of the page being rendered is searched for
+  # the partial. If a full path is given, then the partial is searched for
+  # in that directory.
+  #
+  # Raies a Webby::Error if the partial could not be found.
+  #
+  def _find_partial( part )
+    case part
+    when String
+      part_dir = ::File.dirname(part)
+      part_dir = @page.dir if part_dir == '.'
+
+      part_fn = ::File.basename(part)
+      part_fn = '_' + part_fn unless part_fn =~ %r/^_/
+
+      p = Resources.partials.find(
+          :filename =&gt; part_fn, :in_directory =&gt; part_dir ) rescue nil
+      raise ::Webby::Error, &quot;could not find partial '#{part}'&quot; if p.nil?
+      p
+    when ::Webby::Resources::Partial
+      part
+    else raise ::Webby::Error, &quot;expecting a partial or a partial name&quot; end
+  end
+
+  # This method will put filter guards around the given input string. This
+  # will protect the string from being processed by any remaining filters
+  # (specifically the textile filter).
+  #
+  # The string is returned unchanged if there are no remaining filters to
+  # guard against.
+  #
+  def _guard( str )
+    return str unless @_cursor
+
+    if @_cursor.remaining_filters.include? 'textile'
+      str = &quot;&lt;notextile&gt;\n%s\n&lt;/notextile&gt;&quot; % str
+    end
+    str
+  end
+
   # Returns the binding in the scope of this Renderer object.
   #   
   def _binding() binding end</diff>
      <filename>lib/webby/renderer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,10 +49,10 @@ class DB
   # Iterate over each resource in the database and pass it to the given
   # block.
   #
-  def each( &amp;b )
+  def each( &amp;block )
     keys = @db.keys.sort
     keys.each do |k|
-      @db[k].sort.each(&amp;b)
+      @db[k].sort.each(&amp;block)
     end
     self
   end
@@ -83,14 +83,17 @@ class DB
   # on the limit. The method will return the first resource or all
   # resources, respectively, for which the block returns true.
   # 
-  # Options:
-  #    :in_directory =&gt; directory
-  #    :recursive    =&gt; true or false
-  #    :sort_by      =&gt; attribute
-  #    :reverse      =&gt; true or false
-  #
-  # Examples:
-  #
+  # ==== Options
+  # :in_directory&lt;String&gt;::
+  #   The directory to search.
+  # :recursive&lt;Boolean&gt;::
+  #   Whether or not to recurse into subdirectories
+  # :sort_by&lt;Symbol&gt;::
+  #   Sort results using the given attribute
+  # :reverse&lt;Boolean&gt;::
+  #   Reverse the order of the search results
+  #
+  # ==== Examples
   #    # find the &quot;index&quot; resource in the &quot;foo/bar&quot; directory
   #    @pages.find( :filename =&gt; 'index', :in_directory =&gt; 'foo/bar' )
   #
@@ -116,8 +119,10 @@ class DB
     # figure out which directories to search through and whether to recurse
     # into directories or not
     search = if (dir = opts.delete(:in_directory))
+      dir = dir.sub(%r/^\//, '')
       strategy = if opts.delete(:recursive)
-        lambda { |key| key =~ %r/^#{Regexp.escape(dir)}(?:\/|$)/ }
+        rgxp = dir.empty? ? '.*' : Regexp.escape(dir)
+        lambda { |key| key =~ %r/^#{rgxp}(\/.*)?$/ }
       else
         lambda { |key| key == dir }
       end
@@ -171,10 +176,11 @@ class DB
   # resource. A sibling is any resource that is in the same directory as the
   # _page_.
   #
-  # Options include:
-  #
-  #    :sorty_by =&gt; 'attribute'
-  #    :reverse  =&gt; true
+  # ==== Options
+  # :sorty_by&lt;Symbol&gt;::
+  #   The attribute to sort by
+  # :reverse&lt;Boolean&gt;::
+  #   Reverse the order of the results
   #
   def siblings( page, opts = {} )
     ary = @db[page.dir].dup
@@ -194,10 +200,11 @@ class DB
   # resource. A child is any resource that exists in a subdirectory of the
   # page's directory.
   #
-  # Options include:
-  #
-  #    :sorty_by =&gt; 'attribute'
-  #    :reverse  =&gt; true
+  # ==== Options
+  # :sorty_by&lt;Symbol&gt;::
+  #   The attribute to sort by
+  # :reverse&lt;Boolean&gt;::
+  #   Reverse the order of the results
   #
   def children( page, opts = {} )
     rgxp = Regexp.new &quot;\\A#{page.dir}/[^/]+&quot;</diff>
      <filename>lib/webby/resources/db.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,16 +30,13 @@ class Page &lt; Resource
   # call-seq:
   #    render   =&gt; string
   #
-  # Creates a new Webby::Renderer instance and uses that instance to render
-  # the page contents using the configured filter(s). The filter(s) to
-  # use is defined in the page's meta-data as the 'filter' key.
-  #
-  # Note, this only renders this page. The returned string does not include
-  # any layout rendering.
+  # This method is being deprecated. Please use the +Renderer#render+ method
+  # instead.
   #
   def render( renderer = nil )
+    Webby.deprecated &quot;render&quot;, &quot;it is being replaced by the Renderer#render() method&quot;
     renderer ||= ::Webby::Renderer.new(self)
-    renderer.render_page
+    renderer._render_page
   end
 
   # call-seq</diff>
      <filename>lib/webby/resources/page.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ module Webby::Resources
 # correspond directly to an output file.
 #
 # Partials can contain YAML meta-data at the top of the file. This
-# information is only used to determin the filters to apply to the
+# information is only used to determine the filters to apply to the
 # partial. If there is no meta-data, then the partial text is used &quot;as is&quot;
 # without any processing by the Webby rendering engine.
 #</diff>
      <filename>lib/webby/resources/partial.rb</filename>
    </modified>
    <modified>
      <diff>@@ -69,6 +69,26 @@ class Resource
   end
 
   # call-seq:
+  #    resource[key]    =&gt; value or nil
+  #
+  # Returns the value associated with the given meta-data key. Key is
+  # converted into a string.
+  #
+  def []( key )
+    @mdata[key.to_s]
+  end
+
+  # call-seq:
+  #    resource[key] = value
+  #
+  # Sets the given meta-data key to the value. Key is converted into a
+  # string.
+  #
+  def []=( key, value )
+    @mdata[key.to_s] = value
+  end
+
+  # call-seq:
   #    method_missing( symbol [, *args, &amp;block] )    =&gt; result
   #
   # Invoked by Ruby when a message is sent to the resource that it cannot</diff>
      <filename>lib/webby/resources/resource.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 
-require ::File.join(::File.dirname(__FILE__), %w[.. .. spec_helper])
+require ::File.expand_path(
+    ::File.join(::File.dirname(__FILE__), %w[.. .. spec_helper]))
 
 # ---------------------------------------------------------------------------
 describe Webby::Helpers::CaptureHelper do
@@ -15,28 +16,41 @@ describe Webby::Helpers::CaptureHelper do
     &quot;&lt;% end %&gt;&quot;
   ]
 
-  before do
+  before :all do
     ::File.open(CFN,'w') {|fd| fd.write CLINES.join(&quot;\n&quot;) }
-    @page = Webby::Resources::Page.new(CFN)
-    @renderman = Webby::Renderer.new(@page)
-    @page_content = @page.render( @renderman )
   end
-  
-  after do 
-    ::FileUtils.rm_f(CFN)
+
+  before :each do
+    @renderman = Webby::Renderer.new(
+                 Webby::Resources::Page.new(CFN))
+    @page_content = @renderman.render_page
   end
 
+  after :all do
+    ::FileUtils.rm_f(CFN)
+  end
 
   it 'should not &quot;leak&quot; any content to containing page' do
     @page_content.should_not be_nil
     @page_content.should eql(&quot;Hello world!\n&quot;)
   end
-  
-  it &quot;should create an instance variable containing the nested content&quot; do
-    @renderman.instance_variable_get(&quot;@content_for_sidebar&quot;).should_not be_nil
-    @renderman.instance_variable_get(&quot;@content_for_sidebar&quot;).should eql(&quot;\nI'm sidebar content.\n&quot;) # Note: Leading newline
+
+  it &quot;should return the stored content for the given key&quot; do
+    @renderman.content_for(:sidebar).should_not be_nil
+    @renderman.content_for(:sidebar).should eql(&quot;\nI'm sidebar content.\n&quot;) # Note: Leading newline
+  end
+
+  it &quot;should report if content is associated with a given key&quot; do
+    @renderman.content_for?(:sidebar).should == true
+    @renderman.content_for?(:header).should == false
+  end
+
+  it &quot;should clear content associated with a given key&quot; do
+    @renderman.content_for?(:sidebar).should == true
+    @renderman.delete_content_for(:sidebar)
+    @renderman.content_for?(:sidebar).should == false
   end
 
-end  # describe Webby::Resources::File
+end
 
 # EOF</diff>
      <filename>spec/webby/helpers/capture_helper_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -91,8 +91,11 @@ namespace :gem do
   end
 
   desc 'Install the gem'
-  task :install =&gt; [:clobber, :package] do
-    sh &quot;#{SUDO} #{GEM} install --no-update-sources pkg/#{PROJ.gem._spec.full_name}&quot;
+  task :install =&gt; [:clobber, 'gem:package'] do
+    sh &quot;#{SUDO} #{GEM} install --local pkg/#{PROJ.gem._spec.full_name}&quot;
+
+    # use this version of the command for rubygems &gt; 1.0.0
+    #sh &quot;#{SUDO} #{GEM} install --no-update-sources pkg/#{PROJ.gem._spec.full_name}&quot;
   end
 
   desc 'Uninstall the gem'
@@ -106,6 +109,11 @@ namespace :gem do
   desc 'Reinstall the gem'
   task :reinstall =&gt; [:uninstall, :install]
 
+  desc 'Cleanup the gem'
+  task :cleanup do
+    sh &quot;#{SUDO} #{GEM} cleanup #{PROJ.gem._spec.name}&quot;
+  end
+
 end  # namespace :gem
 
 desc 'Alias to gem:package'</diff>
      <filename>tasks/gem.rake</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ require 'rake/contrib/sshpublisher'
 
 namespace :gem do
   desc 'Package and upload to RubyForge'
-  task :release =&gt; [:clobber, :package] do |t|
+  task :release =&gt; [:clobber, 'gem:package'] do |t|
     v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
     abort &quot;Versions don't match #{v} vs #{PROJ.version}&quot; if v != PROJ.version
     pkg = &quot;pkg/#{PROJ.gem._spec.full_name}&quot;</diff>
      <filename>tasks/rubyforge.rake</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/webby/helpers/textile_code_helper.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>97e53b71e2cb1490655d7790bf9cb2cdfbeca078</id>
    </parent>
    <parent>
      <id>0bb6f7167fa874fa8a270289e22ad7207b1418a5</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>david@chelimac.local</email>
  </author>
  <url>http://github.com/dchelimsky/webby/commit/39477bbc2b7aa4dcddb295e7095b420092099e78</url>
  <id>39477bbc2b7aa4dcddb295e7095b420092099e78</id>
  <committed-date>2008-06-18T04:09:49-07:00</committed-date>
  <authored-date>2008-06-18T04:09:49-07:00</authored-date>
  <message>Merge branch 'master' of git://github.com/TwP/webby</message>
  <tree>a1fa16b9699a12b1e9eff8db63815b076629f6b6</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>david@chelimac.local</email>
  </committer>
</commit>
