Unit 08 · lesson

Production Builds

A production build should be deliberate and reproducible.

The official Jekyll deployment tutorial demonstrates building with a production environment, for example:

JEKYLL_ENV=production bundle exec jekyll build

Use the environment-variable syntax appropriate to your shell/OS.

Test before upload

A production build gives you a chance to inspect:

  • production-only Liquid branches;
  • generated absolute/relative URLs;
  • plugin output;
  • asset paths;
  • metadata;
  • final destination contents.

Clean-build mindset

Do not assume the running dev server's incremental state proves a clean production build.

Stop/clean according to your safe project workflow and run the intended production command from declared dependencies.

Compare development and production

Create a small comparison:

EvidenceDevelopmentProduction
environment value
base path
production-only markup
plugin output
build success

Do not hand-edit _site for production fixes

A production defect should be repaired in source/configuration/build logic and regenerated.

If you patch generated output manually, the next build can erase the repair.

Checkpoint

Produce one clean production build and identify one thing you specifically inspected because production can differ from development.