Skip to content

Commit

Permalink
Merge pull request #468 from jamesluberda/livereload-support
Browse files Browse the repository at this point in the history
support livereload when jekyll-admin is installed
  • Loading branch information
mertkahyaoglu authored Jul 9, 2018
2 parents 0c5e7fa + 39a92d5 commit f3a3893
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ Metrics/PerceivedComplexity:

Style/FrozenStringLiteralComment:
Enabled: false

Naming/MemoizedInstanceVariableName:
Exclude:
- lib/jekyll-admin/page_without_a_file.rb

Naming/UncommunicativeMethodParamName:
Exclude:
- lib/jekyll-admin/data_file.rb
2 changes: 1 addition & 1 deletion jekyll-admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.4"
spec.add_development_dependency "rubocop", "~> 0.48.1"
spec.add_development_dependency "rubocop", "~> 0.57.2"
spec.add_development_dependency "sinatra-cross_origin", "~> 0.3"
spec.add_development_dependency "gem-release", "~> 0.7"
end
4 changes: 4 additions & 0 deletions lib/jekyll/commands/serve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module Commands
class Serve < Command
class << self
def start_up_webrick(opts, destination)
if opts["livereload"]
@reload_reactor.start(opts)
end

server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") }
server.mount(opts["baseurl"], Servlet, destination, file_handler_opts)

Expand Down
5 changes: 0 additions & 5 deletions spec/fixtures/site/_posts/test/2016-01-02-test2.md

This file was deleted.

0 comments on commit f3a3893

Please sign in to comment.