summaryrefslogtreecommitdiff
path: root/make
blob: 6e1fd470de0f08034d1a3de4acfa011b437e1ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env ruby
$:.unshift('lib')
require 'sitegen'
require 'page_index'

# Initialize the site generator
Sitegen::init

# 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|
	Sitegen::want(page.local_outfile)
end
Sitegen::want('out/index.atom')

# Make!
Sitegen::make(:all)