fix: acknowledge livereload_port from site config too (#9606)

Merge pull request 9606
This commit is contained in:
Gourav Khunger 2024-09-08 22:47:06 +05:30 committed by GitHub
parent 753b8aaa09
commit f63a68bedd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
- name: Live reload port - name: Live reload port
description: Port for LiveReload to listen on. description: Port for LiveReload to listen on.
option: "livereload_port: PORT"
flag: "--livereload-port PORT" flag: "--livereload-port PORT"

View File

@ -71,7 +71,6 @@ module Jekyll
end end
cmd.action do |_, opts| cmd.action do |_, opts|
opts["livereload_port"] ||= LIVERELOAD_PORT
opts["serving"] = true opts["serving"] = true
opts["watch"] = true unless opts.key?("watch") opts["watch"] = true unless opts.key?("watch")
@ -94,6 +93,7 @@ module Jekyll
opts = configuration_from_options(opts) opts = configuration_from_options(opts)
destination = opts["destination"] destination = opts["destination"]
if opts["livereload"] if opts["livereload"]
opts["livereload_port"] ||= LIVERELOAD_PORT
validate_options(opts) validate_options(opts)
register_reload_hooks(opts) register_reload_hooks(opts)
end end