diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index ebb6f6de..a1740611 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -34,7 +34,7 @@ module Jekyll end end - # Add any necessary layouts to this post + # Add any necessary layouts to this convertible document # +layouts+ is a Hash of {"name" => "layout"} # +site_payload+ is the site payload hash # @@ -42,7 +42,6 @@ module Jekyll def do_layout(payload, layouts, site_payload) # construct payload payload = payload.merge(site_payload) - # render content self.content = Liquid::Template.parse(self.content).render(payload, [Jekyll::Filters]) self.transform @@ -60,4 +59,4 @@ module Jekyll end end end -end \ No newline at end of file +end diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 043b6cf2..01fe8802 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -9,7 +9,7 @@ module Jekyll # Initialize a new Page. # +base+ is the String path to the # +dir+ is the String path between and the file - # +name+ is the String filename of the post file + # +name+ is the String filename of the file # # Returns def initialize(base, dir, name) @@ -24,8 +24,8 @@ module Jekyll #self.transform end - # Extract information from the post filename - # +name+ is the String filename of the post file + # Extract information from the page filename + # +name+ is the String filename of the page file # # Returns nothing def process(name) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 4e89ec19..7897ec37 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -74,9 +74,11 @@ module Jekyll end end - # Recursively transform and write all non-post pages to / - # +dir+ is the String path part representing the path from - # to the currently processing dir (default '') + # Copy all regular files from to / ignoring + # any files/directories that are hidden (start with ".") or contain + # site content (start with "_") + # The +dir+ String is a relative path used to call this method + # recursively as it descends through directories # # Returns nothing def transform_pages(dir = '') @@ -90,10 +92,12 @@ module Jekyll else first3 = File.open(File.join(self.source, dir, f)) { |fd| fd.read(3) } + # if the file appears to have a YAML header then process it as a page if first3 == "---" page = Page.new(self.source, dir, f) page.add_layout(self.layouts, site_payload) page.write(self.dest) + # otherwise copy the file without transforming it else FileUtils.mkdir_p(File.join(self.dest, dir)) FileUtils.cp(File.join(self.source, dir, f), File.join(self.dest, dir, f))