You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adsf-live should send the path of the web page to live reload.
Actual behavior
adsf-live sends the path to the file here path: "#{Dir.pwd}#{path}"
instead of path: path
Details
You typically only want to reload the page if the change occurred on the page you are viewing. When you change a layout in nanoc it will send many changed pages over the web socket. For livereload to know if the current page changed it needs to compare document.location.pathname with path. At this time it always reloads even if no match is found, but that results in ugly flickering if many pages change. It's not hard to modify the livereload.js to only reload if the path matches, but this comparison is needlessly complicated because the file path is being sent, from which the path first needs to be extracted.
The text was updated successfully, but these errors were encountered:
To be clear, I also needed to make a small change to the livereload.js included with rack-livereload to completely fix the issue, but that fix will be much easier if adsf-live sends the path
(If you use your own copy of livereload and change this line to become
if (path == document.location.pathname) return this.reloadPage()
then the reloading works properly with the change suggested above)
Steps to reproduce
Expected behavior
adsf-live should send the path of the web page to live reload.
Actual behavior
adsf-live sends the path to the file here
path: "#{Dir.pwd}#{path}"
instead of
path: path
Details
You typically only want to reload the page if the change occurred on the page you are viewing. When you change a layout in nanoc it will send many changed pages over the web socket. For livereload to know if the current page changed it needs to compare
document.location.pathname
withpath
. At this time it always reloads even if no match is found, but that results in ugly flickering if many pages change. It's not hard to modify the livereload.js to only reload if the path matches, but this comparison is needlessly complicated because the file path is being sent, from which the path first needs to be extracted.The text was updated successfully, but these errors were encountered: