Commits

Steve Losh  committed 9dc87b2

Put listing pages at folder/index.html instead of folder.html

  • Participants
  • Parent commits 7599815

Comments (0)

Files changed (2)

File jilcrow/core.py

             if vars['title']:
                 vars['head_title'] = vars['title_format'] % vars
             html = template.render(**vars).strip()
-            fname = path.join(self._site['dirs']['deploy'], page.id) + '.html'
+            fname = path.join(self._site['dirs']['deploy'], page.path())
             with open(fname, 'w') as f:
                 f.write(html.encode('utf-8'))
 

File jilcrow/pages.py

 """
 import re
 import urlparse
-from collections import defaultdict
 from datetime import datetime
 from os import path
 
-import dateutil.parser
 import PyRSS2Gen as rss2
 import yaml
 from BeautifulSoup import BeautifulSoup
     def full_url(self):
         return self._site['domain'] + self.url
 
+    def path(self):
+        return self.id + '.html'
+
 
 class Content(Page):
     NORM = {
             'title': month and datetime(year, month, 1).strftime('%B %Y') or year,
         }, **attrs)
 
+    def path(self):
+        return path.join(self.id, 'index.html')
+
 class Month(Archive):
     def __init__(self, site, entries, year, month):
         if not (1 <= month <= 12):