<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,6 +25,10 @@ opts = OptionParser.new do |opts|
     options[:auto] = true
   end
   
+  opts.on(&quot;--server&quot;, &quot;Run a WEBrick server on destination directory&quot;) do
+    options[:server] = true
+  end
+  
   opts.on(&quot;--lsi&quot;, &quot;Use LSI for better related posts&quot;) do
     Jekyll.lsi = true
   end
@@ -78,6 +82,24 @@ case ARGV.size
     exit(1)
 end
 
+if options[:server]
+  require 'webrick'
+  include WEBrick
+
+  s = HTTPServer.new(
+    :Port            =&gt; 4000,
+    :DocumentRoot    =&gt; destination
+  )
+  t = Thread.new {
+    s.start
+  }
+  
+  unless options[:auto]
+    trap(&quot;INT&quot;) { s.shutdown }
+    t.join()
+  end
+end
+
 if options[:auto]
   require 'directory_watcher'
 </diff>
      <filename>bin/jekyll</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ed60ad6f7203e7bd663d8948ebf958864b05d766</id>
    </parent>
  </parents>
  <author>
    <name>John Reilly</name>
    <email>jr@trms.com</email>
  </author>
  <url>http://github.com/mojombo/jekyll/commit/9ecbfb2253e11f5cb0364e24d4f13595efdd20b6</url>
  <id>9ecbfb2253e11f5cb0364e24d4f13595efdd20b6</id>
  <committed-date>2008-12-19T15:50:56-08:00</committed-date>
  <authored-date>2008-12-19T15:49:57-08:00</authored-date>
  <message>Added --server option to start a simple WEBrick server on destination directory</message>
  <tree>69953ec36305b2cae7304428531baacd568470cc</tree>
  <committer>
    <name>John Reilly</name>
    <email>jr@trms.com</email>
  </committer>
</commit>
