diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-07 01:13:12 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-07 01:13:12 -0500 |
commit | c8bb0015d0bee72d707686058e0585afdf3c5ffb (patch) | |
tree | d6ce33f02c56be0b49ec289a20e7738c36c3229c | |
parent | 7e138622129c96a634b41f99dc552015cbe4b5a6 (diff) |
Do more efficient crawling.
-rwxr-xr-x | make | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -6,9 +6,11 @@ require 'page_index' # Initialize the site generator Sitegen::init -# This should trigger a full recursive crawl, loadng everything into -# the sitegen. -IndexPage::new('src').local_input +# Load all pages +def crawl(page) + page.index_pages.select{|p|p.is_a?(IndexPage)}.each{|p|crawl(p)} +end +crawl(IndexPage::new('src')) # Tell the sitegen which files we want Sitegen.pages.each do |page| |