Merge branch 'master' of https://github.com/daneharrigan/jekyll into daneharrigan-master

Conflicts:
	lib/jekyll.rb
This commit is contained in:
Tom Preston-Werner
2012-04-23 16:48:18 -07:00
5 changed files with 54 additions and 10 deletions

View File

@@ -51,10 +51,10 @@ module Jekyll
# Default options. Overriden by values in _config.yml or command-line opts.
# (Strings rather symbols used for compatability with YAML).
DEFAULTS = {
'safe' => false,
'auto' => false,
'server' => false,
'server_port' => 4000,
'safe' => false,
'auto' => false,
'server' => false,
'server_port' => 4000,
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
@@ -66,6 +66,7 @@ module Jekyll
'markdown' => 'maruku',
'permalink' => 'date',
'include' => ['.htaccess'],
'paginate_path' => 'page:num',
'markdown_ext' => 'markdown,mkd,mkdn,md',
'textile_ext' => 'textile',

View File

@@ -37,13 +37,19 @@ module Jekyll
if num_page > 1
newpage = Page.new(site, site.source, page.dir, page.name)
newpage.pager = pager
newpage.dir = File.join(page.dir, "page#{num_page}")
newpage.dir = File.join(page.dir, paginate_path(site, num_page))
site.pages << newpage
else
page.pager = pager
end
end
end
private
def paginate_path(site, num_page)
format = site.config['paginate_path']
format.sub(':num', num_page.to_s)
end
end
class Pager