Merge branch 'custom-layout-directory' of https://github.com/tombell/jekyll into tombell-custom-layout-directory

Conflicts:
	lib/jekyll/site.rb
This commit is contained in:
Tom Preston-Werner
2012-06-11 15:40:22 -07:00
4 changed files with 31 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ module Jekyll
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => File.join(Dir.pwd, '_plugins'),
'layouts' => '_layouts',
'future' => true,
'lsi' => false,

View File

@@ -101,12 +101,12 @@ module Jekyll
self.read_directories
end
# Read all the files in <source>/_layouts and create a new Layout object
# Read all the files in <source>/<layouts> and create a new Layout object
# with each one.
#
# Returns nothing.
def read_layouts
base = File.join(self.source, "_layouts")
base = File.join(self.source, self.config['layouts'])
return unless File.exists?(base)
entries = []
Dir.chdir(base) { entries = filter_entries(Dir['*.*']) }