Just then, I was running smoothly using the jekyll serve command, auto-generation worked well and I was able to see changes immediately after I did some modification locally. But all of a sudden auto-generation stops working even when it is said to be “enabled for ‘(my working directory)’”.
I don’t have the plugin as this post mentions. And I’m able to see changes again only after I use jekyll serve --force_polling.
I’m running on macOS and jekyll version 4.0.0.
Is there any way to only use jekyll serve command again?
Maybe it was just your terminal getting hanged.
Try stopping the local server and re-serving. If it still doesn’t regenerate, try serving your site with the --verbose switch. That may provide a clue as to where the build stalls.
Hi, thanks for your advice. However, even after I stop the local server and re-serve, it still doesn’t regenerate. After adding --verbose onto the command, it shows:
[(time)] INFO WEBrick 1.4.2
[(time)] INFO ruby 2.6.3 (2019-04-16) [universal.x86_64-darwin19]
[(time)] DEBUG WEBrick::HTTPServlet::FileHandler is mounted on /.
[(time)] DEBUG unmount .
[(time)] DEBUG Jekyll::Commands::Serve::Servlet is mounted on .
Server address: http://127.0.0.1:4000
[(time)] INFO WEBrick::HTTPServer#start: pid=20287 port=4000
Server running... press ctrl-c to stop.
which still leaves me no clues about what is going on.
[Updates]
Auto-generation doesn’t work using jekyll serve command still after restarting my laptop.
@ckruse--livereloadautorefreshes your browser window.
Autoregeneration however is about triggering a build process automatically after one of your source file gets changed.
Autoregen is enabled by default when you run jekyll serve.
To enable it with jekyll build, you would need to pass it the --watch switch. i.e. run jekyll build --watch.
Livereload cannot be enabled with build subcommand…
I think I will just run the jekyll serve --force_polling command for now before I get into any trouble again. It works well so far with the --force_polling flag.
seeing as the original post is 2 years old you might want to make a new post and reference this one? and add some detail to what your issue is along with the full output of the console. I don’t think you should need to do force_polling.