mirror of
https://github.com/BretFisher/jekyll-serve.git
synced 2026-07-22 22:03:41 -04:00
Live reload not working #40
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @EDIflyer on GitHub (Jan 12, 2024).
First of all, thank you so much for creating this container - the main
jekyllone kept refusing to build for me with EOF errors, broken pipes, etc.Building the site works OK with your version but I've found live reload doesn't seem to work.
If I used this compose:
Then I get:

If I click on the link it doesn't work but if I change to
http://localhost:4000in my browser it works fine. Port35729doesn't work but I think that's as expected as live-reload not specified??However if I use this compose:
I get this:

I see it now includes both ports and seems to have switched from

0.0.0.0to127.0.0.1however neither of those then work (in eitherlocalhostor127.0.0.1variety - I just get no data served:Should I be triggering livereload differently? Is there an issue with the command?
@BretFisher commented on GitHub (Jan 20, 2024):
I'll assume you're using this with Docker Desktop for Windows in WSL2. If that's true, I don't think file watching works across OS file systems. The way livereload works is the binary (jekyll) uses the Linux file I/O API to know when files change. That doesn't work when the files are living on the Windows file system.
Like Docker's Docs, I recommend you always keep your source code in the Linux file system, and that way you get native file I/O performance (gem installs will be faster) and livereload should work. Editors like VS Code work with files in the Linux file system. VS Code has an extension for it.
@EDIflyer commented on GitHub (Jan 20, 2024):
Ah interesting, thanks @BretFisher