pglevy / thats-the-pod

https://pglevy.github.io/thats-the-pod/
The Unlicense
0 stars 0 forks source link

Figure out regeneration problem with local build and serve #10

Open pglevy opened 4 months ago

pglevy commented 4 months ago
If your Jekyll site keeps regenerating after running bundle exec jekyll serve, it's likely because Jekyll is set to watch for changes in your files and automatically regenerate the site whenever a change is detected. This behavior is common when you run Jekyll in development mode.

To address this issue, you can try a few troubleshooting steps:

Check for Infinite Loops: Make sure you don't have any infinite loops or cyclic dependencies in your site's files, layouts, includes, or data files. These can cause Jekyll to continuously regenerate the site.

Examine Configuration Settings: Review your _config.yml file and ensure that the watch option is not set to true. Setting watch: false will prevent Jekyll from continuously watching for changes.

Examine Includes and Layouts: Ensure that your includes and layouts are not recursively referencing each other or causing loops that trigger regeneration.

Exclude Unnecessary Directories: You can use the exclude option in your _config.yml file to exclude certain directories or files from being watched by Jekyll. This can help reduce unnecessary regeneration.

Check Plugins: If you're using plugins, one of them might be causing the continuous regeneration. Try disabling plugins one by one to identify the culprit.

Check File Permissions: Make sure that the files in your project directory have appropriate permissions and are not being constantly modified by external processes.

Check for External Tools: If you're using external tools or editors that automatically modify files, they might be triggering regeneration. Disable them temporarily to see if the regeneration stops.

If you've tried these steps and the regeneration issue persists, you may need to provide more specific details about your setup and any error messages you're encountering for further assistance.
pglevy commented 4 months ago

I tried excluding _posts in config file. My hope is that this avoids the issue when I'm running locally, but it will not affect the build that happens on the live site.

pglevy commented 4 months ago

Excluding _posts affects the live build so that's no good. For now I can use --no-watch but not helpful when making small changes that require regeneration.