mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Simplify Site#read_layouts.
This commit is contained in:
@@ -101,12 +101,12 @@ module Jekyll
|
||||
self.read_directories
|
||||
end
|
||||
|
||||
# Read all the files in <source>/<dir>/_layouts and create a new Layout
|
||||
# object with each one.
|
||||
# Read all the files in <source>/_layouts and create a new Layout object
|
||||
# with each one.
|
||||
#
|
||||
# Returns nothing.
|
||||
def read_layouts(dir = '')
|
||||
base = File.join(self.source, dir, "_layouts")
|
||||
def read_layouts
|
||||
base = File.join(self.source, "_layouts")
|
||||
return unless File.exists?(base)
|
||||
entries = []
|
||||
Dir.chdir(base) { entries = filter_entries(Dir['*.*']) }
|
||||
|
||||
Reference in New Issue
Block a user