Permalink
Browse files

Adding baseurl option. Fixes #51

  • Loading branch information...
1 parent d53ea4a commit 4a8fc1fa6e3fa5dc05c81ac5ac4ffed0b0818ac4 @arnar arnar committed Nov 17, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 bin/jekyll
View
@@ -40,6 +40,10 @@ opts = OptionParser.new do |opts|
options['server_port'] = port unless port.nil?
end
+ opts.on("--baseurl [BASE_URL]", "Serve website from a given base URL (default '/'") do |baseurl|
+ options['baseurl'] = baseurl
+ end
+
opts.on("--lsi", "Use LSI for better related posts") do
options['lsi'] = true
end
@@ -177,9 +181,9 @@ if options['server']
s = HTTPServer.new(
:Port => options['server_port'],
- :DocumentRoot => destination,
:MimeTypes => mime_types
)
+ s.mount(options['baseurl'], HTTPServlet::FileHandler, destination)
t = Thread.new {
s.start
}

0 comments on commit 4a8fc1f

Please sign in to comment.