Do you usually test Jexyll builds locally before deploying?

I’m getting used to Jekyll so i have a basic question. please someone reply. Do you normally run jekyll build and check generated _site locally before deploying, or do you mostly rely on the deployement build?

I use `JEKYLL_ENV=production bundle exec jekyll serve` and have `incremental: true` in _config.yml. So the site opens in the browser, and whenever I’ve worked in the editor and save, after a brief delay, the page I’m working on automatically refreshes in the browser. That can go through many iterations.
Only after I’m finished with all changes, I mirror the `_site` via sftp (using lftp, uploading only changed pages) to my domain.
Hope that answers your question somewhat. Best, Michael.

I do both, but the local check catches most problems. My routine is `bundle exec jekyll serve --livereload` while writing, then one clean production build before pushing:

JEKYLL_ENV=production bundle exec jekyll build

That second step matters because things like analytics snippets, `jekyll.environment` conditionals and absolute URLs only show up with the production env, and `serve` quietly overrides `url` with localhost. I also run html-proofer on `_site` now and then to catch broken internal links and missing images.

One more tip: pin your Ruby and gem versions (commit `Gemfile.lock`) so the deployment build uses the same versions you tested with. Most “works locally but not on the server” issues I’ve hit came from a different Jekyll or plugin version on the host.

Hi, I’m new to Jekyll and still learning my way around. I test locally first — I run `bundle exec jekyll serve` while I’m working on a change, then do a full production build before deploying, so I can catch broken layouts or config mistakes before they go live. Thanks for sharing your routines above — the tip about checking the production build specifically was helpful.

One thing worth adding: jekyll serve doesn’t reload _config.yml or Gemfile changes, so a config edit can seem to have no effect locally until you restart it — a fresh jekyll build sidesteps that confusion. I also run bundle exec jekyll build --trace --strict_front_matter before deploying: --trace gives a real backtrace instead of a vague Liquid error, and --strict_front_matter fails the build on malformed YAML rather than quietly skipping the page.