{"action":"created","issue":{"url":"https://api.github.com/repos/jaspervdj/hakyll/issues/140","labels_url":"https://api.github.com/repos/jaspervdj/hakyll/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/jaspervdj/hakyll/issues/140/comments","events_url":"https://api.github.com/repos/jaspervdj/hakyll/issues/140/events","html_url":"https://github.com/jaspervdj/hakyll/issues/140","id":13926211,"number":140,"title":"Implement live-reload for preview mode","user":{"login":"meiersi","id":224829,"avatar_url":"https://avatars.githubusercontent.com/u/224829?v=3","gravatar_id":"","url":"https://api.github.com/users/meiersi","html_url":"https://github.com/meiersi","followers_url":"https://api.github.com/users/meiersi/followers","following_url":"https://api.github.com/users/meiersi/following{/other_user}","gists_url":"https://api.github.com/users/meiersi/gists{/gist_id}","starred_url":"https://api.github.com/users/meiersi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meiersi/subscriptions","organizations_url":"https://api.github.com/users/meiersi/orgs","repos_url":"https://api.github.com/users/meiersi/repos","events_url":"https://api.github.com/users/meiersi/events{/privacy}","received_events_url":"https://api.github.com/users/meiersi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2013-05-03T08:43:31Z","updated_at":"2015-09-13T13:10:03Z","closed_at":null,"body":"A recent trend for web development is to use live-reload to get rid of the need to refresh the browser by yourself after changing the source files. The implementations work by injecting a piece of JavaScript into the page, which then connects to your preview server and forces a reload if told so. One implementation can be found here: https://github.com/gruntjs/grunt-contrib-livereload.\r\n\r\nIt should be rather simple to adapt https://github.com/gruntjs/grunt-contrib-livereload to be used in the preview mode of Hakyll."},"comment":{"url":"https://api.github.com/repos/jaspervdj/hakyll/issues/comments/139873032","html_url":"https://github.com/jaspervdj/hakyll/issues/140#issuecomment-139873032","issue_url":"https://api.github.com/repos/jaspervdj/hakyll/issues/140","id":139873032,"user":{"login":"benkolera","id":159197,"avatar_url":"https://avatars.githubusercontent.com/u/159197?v=3","gravatar_id":"","url":"https://api.github.com/users/benkolera","html_url":"https://github.com/benkolera","followers_url":"https://api.github.com/users/benkolera/followers","following_url":"https://api.github.com/users/benkolera/following{/other_user}","gists_url":"https://api.github.com/users/benkolera/gists{/gist_id}","starred_url":"https://api.github.com/users/benkolera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkolera/subscriptions","organizations_url":"https://api.github.com/users/benkolera/orgs","repos_url":"https://api.github.com/users/benkolera/repos","events_url":"https://api.github.com/users/benkolera/events{/privacy}","received_events_url":"https://api.github.com/users/benkolera/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T13:10:03Z","updated_at":"2015-09-13T13:10:03Z","body":"For anyone that comes along here later. The easiest way that I found was just to reuse the existing nodejs library. It's easy if you already have npm. I wrote about it here: http://benkolera.com/posts/2015-09-14-hakyll_livereload.html\r\n\r\nGiven that most web dev people tend to have nodejs around for building web stuff and the live reload server is super simple and works, I don't see an intense need to build something into site watch that implemented the LiveReload protocol or anything like that.\r\n\r\nCould be documented on the hakyll wiki, though. I'm happy to submit a PR with my docs if that seems like it'd be useful to someone else! :smile: "}}