Sha256: f86b3a265c906b1ebf56ee2779703d379256dfd62f48b992a22128cc027379df
Contents?: true
Size: 1 KB
Versions: 7
Compression:
Stored size: 1 KB
Contents
module Jekyll module Commands class Serve < Command class << self def start_up_webrick(opts, destination) server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") } server.mount(opts["baseurl"], Servlet, destination, file_handler_opts) jekyll_admin_monkey_patch(server) Jekyll.logger.info "Server address:", server_address(server, opts) launch_browser server, opts if opts["open_url"] boot_or_detach server, opts end def jekyll_admin_monkey_patch(server) server.mount "/admin", Rack::Handler::WEBrick, JekyllAdmin::StaticServer server.mount "/_api", Rack::Handler::WEBrick, JekyllAdmin::Server Jekyll.logger.warn "Auto-regeneration:", "disabled by JekyllAdmin." Jekyll.logger.warn "", "The site will regenerate only via the Admin interface." Jekyll.logger.info "JekyllAdmin mode:", ENV["RACK_ENV"] || "production" end end end end end
Version data entries
7 entries across 7 versions & 3 rubygems