<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,7 +9,7 @@ $SILENT = true
 
 class SlideDown
   USAGE = &quot;The SlideDown command line interface takes a .md (Markdown) file as its only required argument. It will convert the file to HTML in standard out. Options:
-  -t, --template [TEMPLATE] the .erb files in /templates directory. Default is -t default, which prints stylesheets and javascripts inline. The import template uses link and script tags.&quot;
+  -t, --template [TEMPLATE] the .erb files in /templates directory. Default is -t default, which prints stylesheets and javascripts inline. The import template uses link and script tags. This can also accept an absolute path for templates outside the /templates directory.&quot;
 
   attr_accessor :stylesheets, :title
   attr_reader :classes
@@ -63,9 +63,13 @@ class SlideDown
   end
 
   def render(name)
-    directory = File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;templates&quot;)
-    path      = File.join(directory, &quot;#{name}.erb&quot;)
-    template  = File.read(path)
+    if is_absolute_path?(name)
+      template = File.read(&quot;#{name}.erb&quot;)
+    else
+      directory = File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;templates&quot;)
+      path      = File.join(directory, &quot;#{name}.erb&quot;)
+      template  = File.read(path)
+    end
     ERB.new(template).result(binding)
   end
 
@@ -100,4 +104,8 @@ class SlideDown
       ''
     end
   end
+
+  def is_absolute_path?(path)
+    path == File.expand_path(path)
+  end
 end</diff>
      <filename>lib/slidedown.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,16 @@ describe 'slidedown commandline tool' do
     result_file_content.should == reference_file_content
   end
 
+  it &quot;accepts -t /full/path/to/template-filename&quot; do
+    import_template_path = File.join(root_path, 'templates', 'import.erb')
+    other_template_path  = Tempfile.new(&quot;slidedown-template&quot;).path
+    File.copy(import_template_path, &quot;#{other_template_path}.erb&quot;)
+
+    run_slidedown(&quot;-t #{other_template_path}&quot;)
+
+    result_file_content.should == reference_file_content(&quot;slides-import&quot;)
+  end
+
   def run_slidedown(opts = &quot;&quot;)
     `#{slidedown_path} #{source_path} #{opts} &gt; #{result_file_path}`
   end</diff>
      <filename>spec/commandline_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c421288aec5021e660414551330cf156bcae9a9e</id>
    </parent>
  </parents>
  <author>
    <name>Jason Morrison</name>
    <email>jmorrison@thoughtbot.com</email>
  </author>
  <url>http://github.com/nakajima/slidedown/commit/0afb72495845c1532b0ab3edac07b45b42e25dc1</url>
  <id>0afb72495845c1532b0ab3edac07b45b42e25dc1</id>
  <committed-date>2009-09-02T11:58:23-07:00</committed-date>
  <authored-date>2009-09-02T11:58:23-07:00</authored-date>
  <message>Allow the -t commandline argument to accept absolute paths for template files</message>
  <tree>788008cae1c65fc152279e9bec2bbad3b00a12f9</tree>
  <committer>
    <name>Jason Morrison</name>
    <email>jmorrison@thoughtbot.com</email>
  </committer>
</commit>
