Class: Jekyll::Commands::Serve
- Inherits:
-
Command
- Object
- Command
- Jekyll::Commands::Serve
- Defined in:
- lib/jekyll/commands/serve.rb
Class Method Summary collapse
Class Method Details
.jekyll_admin_monkey_patch(server) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/jekyll/commands/serve.rb', line 16 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 Jekyll Manager." Jekyll.logger.warn "", "The site will regenerate only via the Admin interface." Jekyll.logger.info "Jekyll Manager mode:", ENV["RACK_ENV"] || "production" end |
.start_up_webrick(opts, destination) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/jekyll/commands/serve.rb', line 5 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 |