incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [4/7] git commit: Add support to render guides.
Date Sat, 28 Jan 2012 00:40:26 GMT
Add support to render guides.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/53cf9855
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/53cf9855
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/53cf9855

Branch: refs/heads/master
Commit: 53cf9855194318011c6c3e636675a3fd8af341f2
Parents: ff76e1b
Author: Michael Brooks <michael@michaelbrooks.ca>
Authored: Thu Jan 26 14:38:12 2012 -0800
Committer: Fil Maj <filip.maj@nitobi.com>
Committed: Fri Jan 27 16:38:38 2012 -0800

----------------------------------------------------------------------
 lib/phonegap/update_keyword_index.rb |    4 ++--
 lib/phonegap_docs.rb                 |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/53cf9855/lib/phonegap/update_keyword_index.rb
----------------------------------------------------------------------
diff --git a/lib/phonegap/update_keyword_index.rb b/lib/phonegap/update_keyword_index.rb
index 11aa927..c981a1c 100644
--- a/lib/phonegap/update_keyword_index.rb
+++ b/lib/phonegap/update_keyword_index.rb
@@ -14,7 +14,7 @@ class UpdateKeywordIndex
   
   def run(filename)
     return false unless File.basename(filename) == '_index.html'
-    
+
     doc = Nokogiri::HTML(File.read(filename))
     
     element = doc.css('#subheader > h1')[0]
@@ -28,7 +28,7 @@ class UpdateKeywordIndex
     
     # Update referenced to index.md.html
     # Then save
-    File.open(filename, 'w') { |file| file.write doc.to_html.gsub('index.md.html', 'index.html')
}
+    File.open(filename, 'w') { |file| file.write doc.to_html.gsub('/index.md.html', '/index.html')
}
     
     return true
   end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/53cf9855/lib/phonegap_docs.rb
----------------------------------------------------------------------
diff --git a/lib/phonegap_docs.rb b/lib/phonegap_docs.rb
index 472328e..f95727c 100644
--- a/lib/phonegap_docs.rb
+++ b/lib/phonegap_docs.rb
@@ -68,6 +68,7 @@ class PhoneGapDocs
     
     klasses.each do |klass|
       each_file input_directory do |file|
+        next if file.match(/\/guide\//) # do not process the guides
         klass.run file
       end
     end


Mime
View raw message