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.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/page_index.rb b/lib/page_index.rb
index 42c9e21..31d4682 100644
--- a/lib/page_index.rb
+++ b/lib/page_index.rb
@@ -28,13 +28,15 @@ class IndexPage < LocalPage
@ls ||= Dir::entries(local_infile)
.select{|fname|not fname.start_with?(".")}
.map{|fname|"#{local_infile}/#{fname}"}
- .select{|path|Dir::exist?(path) or Config::get.html_suffixes.include?(File::extname(path).gsub(/^[.]/, ''))}
end
def index_pages
if @pages.nil?
@pages = Set[]
for path in _ls
- @pages.add( Dir::exist?(path) ? IndexPage::new(path) : LocalPage::new(path) )
+ page = LocalPage::load(path)
+ unless page.nil?
+ @pages.add(page)
+ end
end
for data in (_metadata['external'] || [])
@pages.add(RemotePage::new(data))