summaryrefslogtreecommitdiff
path: root/lib/page_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/page_index.rb')
-rw-r--r--lib/page_index.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/page_index.rb b/lib/page_index.rb
index 43bf367..585fd57 100644
--- a/lib/page_index.rb
+++ b/lib/page_index.rb
@@ -57,7 +57,7 @@ class IndexPage < LocalPage
def index_link(cururl, depth)
ret = ''
unless depth <= 1
- ret += "<h#{depth}>[#{atom_title}](#{cururl.route_to(url)})</h#{depth}>\n\n"
+ ret += "<section><h#{depth}>[#{atom_title}](#{cururl.route_to(url)})</h#{depth}>\n\n"
end
for page in index_pages.select{|page|not page.is_a?(IndexPage)}.sort_by{|page|page.atom_published}
ret += page.index_link(cururl, depth+1)
@@ -67,6 +67,9 @@ class IndexPage < LocalPage
ret += page.index_link(cururl, depth+1)
end
ret += "\n"
+ unless depth <= 1
+ ret += "</section>\n\n"
+ end
return ret.gsub(/\n\n+/, "\n\n")
end
def index_title