awood / hawkins

A Jekyll plugin that incorporates LiveReload
MIT License
57 stars 4 forks source link

Livereload script is served from invalid URL http://0.0.0.0:35729/livereload.js #8

Closed ricalo closed 7 years ago

ricalo commented 7 years ago

Hi,

I'm trying to setup a container image that serves my Jekyll sites for my development environment. Because of this, is use host: 0.0.0.0 in my _config.yml file. This allows my container to serve the site from all interfaces.

However, this causes Hawkins to serve the Livereload script from http://0.0.0.0:35729/livereload.js which is a non-routable address and doesn't work on some browsers (e.g. Chrome on Windows).

Is there any workaround to make the plugin override the host value when rendering the script tag and use something like http://localhost:35729/livereload.js? Or use a relative URL, like /livereload.js?

Thanks!

awood commented 7 years ago

That sounds like a bug to me! I will get started on fixing it.

awood commented 7 years ago

Just pushed Hawkins-2.0.5 to rubygems.org. Thanks for using Hawkins!

ricalo commented 7 years ago

Fixed. Thank you!