[ARVADOS] created: 3acd32f8a766269e0d7841000eb58e6d8364fcc9

git at public.curoverse.com git at public.curoverse.com
Wed Apr 2 13:00:37 EDT 2014


        at  3acd32f8a766269e0d7841000eb58e6d8364fcc9 (commit)


commit 3acd32f8a766269e0d7841000eb58e6d8364fcc9
Author: Ward Vandewege <ward at curoverse.com>
Date:   Wed Apr 2 12:58:00 2014 -0400

    doc: Add rake linkchecker task, and document it in the README file

diff --git a/doc/README.textile b/doc/README.textile
index f88d304..38a53cf 100644
--- a/doc/README.textile
+++ b/doc/README.textile
@@ -24,6 +24,17 @@ Alternately, to make the documentation browsable on the local filesystem:
 arvados/doc$ rake generate baseurl=$PWD/.site
 </pre>
 
+h2. 2. Run linkchecker
+
+If you have "Linkchecker":http://wummel.github.io/linkchecker/ installed on
+your system, you can run it against the documentation:
+
+<pre>
+arvados/doc$ rake linkchecker baseurl=$PWD/.site
+</pre>
+
+Please note that this will regenerate your $PWD/.site directory.
+
 h2. 2. Preview HTML pages
 
 <pre>
diff --git a/doc/Rakefile b/doc/Rakefile
index d8af62f..dbef7b9 100644
--- a/doc/Rakefile
+++ b/doc/Rakefile
@@ -12,6 +12,22 @@ task :generate do
   end
 end
 
+task :linkchecker => [:realclean, :generate]
+
+task :linkchecker do
+  Dir.chdir(".site")
+  `which linkchecker`
+  if $? == 0
+    ignore_urls = ['', 'javascript', 'mailto',
+                   'oftc.net', 'putty.org','google.com', 'fsf.org',
+                   'arvadosapi.com', 'arvados.org', 'sourceforge.net',
+                   'chiark.greenend.org.uk', 'github.io' ]
+    system "linkchecker index.html " + ignore_urls.join(' --ignore-url=')
+  else
+    puts "Warning: linkchecker not found, skipping".colorize(:light_red)
+  end
+end
+
 require "zenweb/tasks"
 load "zenweb-textile.rb"
 load "zenweb-liquid.rb"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list