summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-07 01:13:12 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-07 01:13:12 -0500
commitc8bb0015d0bee72d707686058e0585afdf3c5ffb (patch)
treed6ce33f02c56be0b49ec289a20e7738c36c3229c
parent7e138622129c96a634b41f99dc552015cbe4b5a6 (diff)
Do more efficient crawling.
-rwxr-xr-xmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/make b/make
index 844d28b..6e1fd47 100755
--- a/make
+++ b/make
@@ -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|