Skip to content

Commit

Permalink
Adding baseurl option. Fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
arnar committed Nov 17, 2010
1 parent d53ea4a commit 4a8fc1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/jekyll
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 4a8fc1f

Please sign in to comment.