Speeding Up Jekyll Development with Incremental Builds
Learn how Jekyll’s incremental build feature can reduce rebuild times from seconds to under a second for isolated edits, with setup steps, a worked example, and cautions about layouts and plugins.
15 Oct 2025, 22:43 UTC

The problem: waiting for a full rebuild kills iteration speed
When a Jekyll site grows to hundreds of posts or pages, a simple change—like fixing a typo in one article—can trigger a full site regeneration that takes several seconds or more. During local writing or CI previews, that delay adds up and distracts from the actual content work.
Thesis: enable Jekyll’s incremental build feature to regenerate only what changed
Jekyll 3.3 introduced an incremental mode that tracks file timestamps and rebuilds only the affected pages, posts, or collections. The rest of the site is left untouched, which can cut rebuild time from seconds to a fraction of a second for isolated edits.
How incremental builds work
When incremental mode is active, Jekyll maintains a cache (stored in .jekyll-cache) that records the last known state of each source file. On each build, it compares the current timestamps against the cache:
- If a file is unchanged, its output is reused from the previous build.
- If a file is modified, Jekyll reprocesses that file and any downstream pages that depend on it (e.g., a layout change affects all pages using that layout).
The feature works with the default Liquid templating engine and most core plugins. It does not require changes to your site structure or build scripts.
Enabling incremental mode
You can turn on incremental builds either temporarily via the CLI or permanently in your configuration.
Via command line (good for quick testing)
# Run from the root of your Jekyll project
jekyll serve --incremental
You should see a log line similar to:
Incremental build enabled.
No special permissions are needed beyond the ability to execute jekyll in your project directory.
Via _config.yml (for persistent use)
# _config.yml
incremental: true
After adding the flag, restart jekyll serve or run jekyll build as usual.
Worked example: measuring the impact
Consider a blog with 500 Markdown posts, each front‑matter populated and using a simple layout. On a typical laptop (Ruby 3.2, Jekyll 4.3), a full rebuild takes about 12 seconds:
time jekyll build
# real 0m12.34s
Now edit a single post (e.g., change a sentence in _posts/2026-09-01-example.md) and rebuild with incremental mode:
jekyll build --incremental
# real 0m1.78s
The observed rebuild time drops to under two seconds—a roughly 85% reduction. The generated _site directory shows the updated post’s HTML file with a newer timestamp, while unrelated pages (e.g., _site/about/index.html) retain their previous timestamps, confirming they were not regenerated.
Trade‑offs and limitations
Incremental builds are a speed optimization, not a replacement for full builds. Be aware of the following caveats:
- Layouts, includes, and Sass: Changes to these files may not propagate to all dependent pages because Jekyll’s dependency tracking is limited to direct file modifications. If you edit a layout, you should run a full rebuild (
jekyll buildwithout--incremental) to ensure consistency. - Third‑party plugins: Plugins that mutate the site source, rely on global state, or generate pages dynamically can produce stale output when incremental mode is on. Check each plugin’s documentation for compatibility.
- Cache corruption: Switching Git branches or manually editing
.jekyll-cachecan leave the cache out of sync, causing outdated content until you perform a clean rebuild (jekyll cleanfollowed byjekyll build).
Practical verification steps
- Run
jekyll serve --incrementaland confirm the log lineIncremental build enabled.appears. - Make a change to a single post, then run
time jekyll build --incrementaland note the duration. - Compare that duration to a baseline full rebuild (
time jekyll build) performed before enabling the flag. - Inspect
_site: the edited post’s file should have a newer timestamp; at least one unrelated page should retain its old timestamp.
If you notice missing updates after editing a layout or include, run a full rebuild to clear any stale output.
Actionable closing
For sites where content edits outnumber structural changes, enabling incremental builds is a low‑effort way to speed up local development and CI previews. Start by testing with jekyll serve --incremental, measure the improvement, and add incremental: true to _config.yml if the results are satisfactory. Remember to schedule occasional full rebuilds—especially after layout, include, or Sass tweaks—to keep the generated site in sync.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.