transform: Explicitly bind LiveReload to server port
authorDragos Plesca <dragos.plesca@gmail.com>
Thu, 16 Jun 2016 16:43:47 +0000 (19:43 +0300)
committerAnthony Fok <foka@debian.org>
Thu, 30 Jun 2016 22:47:56 +0000 (16:47 -0600)
commit7e08d23eebe8de8c688150900423dca6234b22a8
treeaa0fbdf724e67c2cc0baaa676ff94004b64a56af
parent0ce6438268961b76d11ef6e9210b03c2100171b1
transform: Explicitly bind LiveReload to server port

If hugo server is run on port 80 or 443, LiveReload does not
correctly bind to the same port, instead using port 35729.
This commit adds functionality to inform LiveReload of the
correct port to bind to.

See https://github.com/livereload/livereload-js/issues/16

Partially contributed by Jeff Minard (@chuyskywalker).

Fixes #2205
transform/livereloadinject.go
transform/livereloadinject_test.go