ChrisPenner / slick

Static site generator built on Shake configured in Haskell
BSD 3-Clause "New" or "Revised" License
204 stars 24 forks source link

Example doesn't live reload #7

Closed ChrisPenner closed 4 years ago

ChrisPenner commented 5 years ago

Currently the example doesn't seem to react to any file changes in the site, it perpetually serves the results of the first build.

Any ideas on that @sigrlami ? Note that I had to switch the slick-live dependency from your private gitlab to https://github.com/sigrlami/slick-live for it to even build; so perhaps that's out of date?

Let me know if you have any problems reproducing, it'd be nice to have the example work cleanly :)

I'm running:

stack build && stack exec example-site-exe -- -P

in the example-site directory, then change some contents of the site directory and don't see any updates on localhost:3030 even after refreshing.

sigrlami commented 5 years ago

Indeed. We moved it into company repo after I showed it's possible. I'll ask to make repository public and prepare PR to fix this. I believe there are couple additions.

sigrlami commented 5 years ago

@ChrisPenner initial repo is public now https://gitlab.com/migamake/slick-live and you need to add js into template

<script type="text/javascript" async="true" src="/js/livereload.js"></script>

in example-site templates. Best place would be either meta-data.html or make shared header template to use between pages.

Would you like me to prepare PR where everything in place for example site?

ChrisPenner commented 5 years ago

Great thanks!

If you don't mind the extra work then go for it! It'd be great to have the example demo how it works :)

sigrlami commented 5 years ago

Yes, no problem. I'll prepare update.