Unit 09 · lesson

Source Hygiene and Generated-File Review

A mature repository should make it obvious which files humans maintain and which files tools regenerate.

Inspect the root

Ask of every major file/folder:

Why is this here?

Examples:

Gemfile             dependency declaration
Gemfile.lock        resolved dependencies
_config.yml         build/site configuration
_layouts            reusable template source
_includes           reusable fragments
_data               structured data
_posts              dated source content
_projects           project collection source
assets              site assets/source
_site               generated destination

Ignore generated/local state intentionally

Your .gitignore should reflect the project's build/tooling behavior.

Do not copy a giant ignore file from another ecosystem without reading it.

Common Jekyll/Bundler generated/local directories may be ignored depending on workflow.

Verify against your project and current Jekyll/Bundler recommendations.

_site review

Even if _site is not committed, inspect it before final release.

Look for:

  • stale pages you thought you removed;
  • unexpected copied files;
  • private/source-only files;
  • wrong URLs;
  • duplicated assets.

A clean build helps distinguish stale destination state from current source.

Dead source

Remove:

  • unused includes/layouts;
  • abandoned CSS experiments;
  • unused data fields;
  • obsolete screenshots;
  • plugins/themes no longer selected.

Only after checking that nothing still references them.

Checkpoint

Create a source-hygiene diff that removes or clarifies at least one unnecessary artifact without changing intended site behavior.