Hello Jekyll Community,
I am currently facing one persistent issue with my Jekyll website where the build process completes successfully, but an updated page does not always contain the latest content in the generated production output. The specific problem is that I can modify an existing Markdown post or page, run the Jekyll build process, and receive a successful build with no obvious errors, but the generated HTML for that particular page can sometimes still contain the previous version of the content. The issue is intermittent because many changes are reflected correctly, while occasionally a modified page appears to remain unchanged after the build. The source Markdown file definitely contains the new content before I run the build, so I am trying to understand why Jekyll would sometimes generate an older version of the same page even though the build itself reports success.
I have verified the source file carefully before each test and have checked that the modified content is located in the expected collection, post, or page directory. When I make a change and run Jekyll normally, the command completes without reporting a Liquid error, front matter error, or other build failure. In some cases, inspecting the generated HTML shows exactly the content I expected, but in the cases where the issue occurs, the generated file appears to contain an earlier version. I have also tried making a clean build by removing the _site directory before running the build again, and I am still trying to determine whether something else in the build environment could be causing the older content to be reused. Since the generated output is what eventually gets deployed to the live website, I want to establish whether Jekyll itself is generating stale content or whether my build workflow is accidentally using an outdated source or generated file.
The problem does not appear to affect every page at the same time. Usually the majority of the website is generated correctly, while one particular page or post may not reflect the latest edit. The affected content can be relatively simple, such as changing a paragraph, heading, or metadata value, so there does not appear to be a complicated template operation required to reproduce it. I have checked the file modification time and confirmed that the source file was changed before the build started. I have also inspected the resulting HTML manually rather than relying only on the browser, because I want to determine whether the problem occurs during Jekyll generation or later when the website is served. This distinction is important to me because if the _site output already contains the old content, I need to investigate the Jekyll build process, whereas if the generated HTML is correct, the problem would have to be investigated elsewhere.
I have also reviewed my layouts, includes, and Liquid templates to make sure that the page is actually rendering the expected source object. The templates are shared by several pages and normally work correctly, which makes the intermittent nature of the problem confusing. I have considered whether Jekyll’s incremental build behaviour could be involved, particularly because the problem seems less likely when I perform a completely fresh build. However, I do not want to assume that incremental regeneration is the cause without understanding how to verify it. I would like to know whether there are specific Jekyll commands or verbose/debug options that can show exactly which source files are being regenerated and which pages are being skipped during a build. If there is a reliable way to confirm that a particular page has been regenerated from its current Markdown source rather than an older cached representation, that would help me narrow the problem down considerably.
The issue is important because my normal workflow involves editing content, building the website, and then deploying the generated _site directory. When the generated page contains outdated content, the deployment itself can appear successful while visitors still receive an older version of the page. I have started comparing the source Markdown file with the generated HTML immediately after each build so that I can capture the problem before deployment. I am also keeping track of the exact command used for each build and whether the output directory was cleaned beforehand. I would prefer not to solve this by manually deleting files or performing repeated builds every time I publish a change, because the underlying cause would still remain and could eventually result in an incorrect production deployment.
I would appreciate guidance from the Jekyll community on how to systematically diagnose this specific stale-generation issue. In particular, I would like to know whether there are Jekyll configuration options, build flags, cache directories, incremental-build behaviours, or diagnostic commands that I should inspect when a modified source file occasionally produces outdated generated HTML. I would also appreciate advice on how to determine conclusively whether the stale content is coming from Jekyll’s generation process or from my deployment environment after the _site directory has already been generated correctly. My goal is to make the build process deterministic so that whenever I modify a page or post and run a successful Jekyll build, the generated production output always contains that exact latest version of the source content without requiring repeated clean builds or manual intervention. Sorry for long post!