<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/source/sitemap.xml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -26,11 +26,13 @@ Feature: Fancy permalinks
   Scenario: Use pretty permalink schema for pages
     Given I have an &quot;index.html&quot; page that contains &quot;Totally index&quot;
     And I have an &quot;awesome.html&quot; page that contains &quot;Totally awesome&quot;
+    And I have an &quot;sitemap.xml&quot; page that contains &quot;Totally uhm, sitemap&quot;
     And I have a configuration file with &quot;permalink&quot; set to &quot;pretty&quot;
     When I run jekyll
     Then the _site directory should exist
     And I should see &quot;Totally index&quot; in &quot;_site/index.html&quot;
     And I should see &quot;Totally awesome&quot; in &quot;_site/awesome/index.html&quot;
+    And I should see &quot;Totally uhm, sitemap&quot; in &quot;_site/sitemap.xml&quot;
 
   Scenario: Use custom permalink schema with prefix
     Given I have a _posts directory</diff>
      <filename>features/permalinks.feature</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@ module Jekyll
     def url
       return permalink if permalink
 
-      @url ||= template.gsub(':name', basename)
+      @url ||= (ext == '.html') ? template.gsub(':name', basename) : &quot;/#{name}&quot;
     end
 
     # Extract information from the page filename
@@ -91,7 +91,7 @@ module Jekyll
 
       # The url needs to be unescaped in order to preserve the correct filename
       path = File.join(dest, CGI.unescape(self.url))
-      if self.url[/\.html$/].nil?
+      if self.ext == '.html' &amp;&amp; self.url[/\.html$/].nil?
         FileUtils.mkdir_p(path)
         path = File.join(path, &quot;index.html&quot;)
       end</diff>
      <filename>lib/jekyll/page.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,6 +81,17 @@ class TestPage &lt; Test::Unit::TestCase
         assert File.exists?(File.join(dest_dir, 'contacts', 'index.html'))
       end
       
+      should &quot;write properly with extension different from html&quot; do
+        page = setup_page(&quot;sitemap.xml&quot;)
+        page.site.permalink_style = :pretty
+        do_render(page)
+        page.write(dest_dir)
+
+        assert_equal(&quot;/sitemap.xml&quot;, page.url)
+        assert_nil(page.url[/\.html$/])
+        assert File.directory?(dest_dir)
+        assert File.exists?(File.join(dest_dir,'sitemap.xml'))
+      end
     end
 
   end </diff>
      <filename>test/test_page.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f1c8e388e406e2cc022354562d8bd683d1262072</id>
    </parent>
  </parents>
  <author>
    <name>Jeffry Degrande</name>
    <email>jeffry@jeffrydegrande.com</email>
  </author>
  <url>http://github.com/mojombo/jekyll/commit/176c047ff16493205f9ed17df36f989598443570</url>
  <id>176c047ff16493205f9ed17df36f989598443570</id>
  <committed-date>2009-07-14T16:17:44-07:00</committed-date>
  <authored-date>2009-06-29T04:40:31-07:00</authored-date>
  <message>bugfix for permalinks

Signed-off-by: Nick Quaranto &lt;nick@quaran.to&gt;</message>
  <tree>ea4966a92b84b5421564840c951e7245a02863f7</tree>
  <committer>
    <name>Nick Quaranto</name>
    <email>nick@quaran.to</email>
  </committer>
</commit>
