diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 16:45:53 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 16:45:53 -0500 |
commit | 5022d1a0df1534b1cbec1cbee23568f201ea1cc6 (patch) | |
tree | 559db39e2be5933c621a02c3f9874641b7f1a70c /lib/page_index.rb | |
parent | f63a89bb8c494ea6b049285ec7c904d6d6136a88 (diff) |
Implement actual file generation, go through fixing things.
Diffstat (limited to 'lib/page_index.rb')
-rw-r--r-- | lib/page_index.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/page_index.rb b/lib/page_index.rb index 178525c..fed7e5f 100644 --- a/lib/page_index.rb +++ b/lib/page_index.rb @@ -41,6 +41,17 @@ class IndexPage < LocalPage end @pages end + def index_pages_leaves + ret = Set[] + index_pages.each do |page| + if page.is_a?(IndexPage) + ret.merge(page.index_pages) + else + ret.add(page) + end + end + return ret + end def index_link(cururl, depth) ret = '' @@ -61,6 +72,9 @@ class IndexPage < LocalPage _metadata['title'] end + def local_intype + return 'markdown' + end def local_outfile local_infile.sub(/^src/, 'out')+"/index.html" end |