Commits

Andrey Vlasovskikh committed 49083d5

Fixed trailing slash in URLs of index pages

Comments (0)

Files changed (3)

 def path2url(path):
     m = re.match('(.*)/index.html?$', path)
     if m:
-        path = m.group(1)
+        path = '{0}/'.format(m.group(1))
     return urllib.pathname2url('/{0}'.format(path))
 
 

test/data/rendered_pages/after/b/index.html

+---
+layout: layout-1
+---
+
+<p>This is an index page.</p>

test/data/rendered_pages/before/b/index.html

+---
+layout: layout-1
+---
+
+<p>This is an index page.</p>