From 3840380c8d6b958cdf831d4957b01841d4a806ed Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Wed, 10 Dec 2008 00:33:05 -0800 Subject: [PATCH 1/4] Updating the documentation for Site#transform_pages --- lib/jekyll/site.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 4e89ec19..b096dede 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 = '') From 96bf21dce7496cfee2b4cdfedf0cdded08690434 Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Wed, 10 Dec 2008 13:33:35 -0800 Subject: [PATCH 2/4] Updating documentation for Convertible#do_layout Making it clear that this method doesn't just work on posts --- lib/jekyll/convertible.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 From ece127c86531977c236ce526dba079a8a3a4aff0 Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Wed, 10 Dec 2008 13:37:14 -0800 Subject: [PATCH 3/4] Adding some comments to transform_pages to explain what's going on --- lib/jekyll/site.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index b096dede..7897ec37 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -92,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)) From f3a1aa99e274957301d8f72f33fcb39bd121129e Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Wed, 10 Dec 2008 15:24:49 -0800 Subject: [PATCH 4/4] updating some comments in Page that referred to Post --- lib/jekyll/page.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)