Writing / Note

Recovering a site when only the HTML remains

Take a byte-level baseline first, then separate content from the repeated page shell.

On this page
  1. The five steps
  2. Quirks worth knowing about
  3. What can and can’t come back

The live web directory held HTML, CSS, JavaScript and images, but no Eleventy source files and no Git history. The source was gone; the published output was all that remained. This is how I rebuilt from it without changing a byte.

The five steps

  1. Snapshot. Copy the whole production directory somewhere outside the web root.
  2. Manifest. Record a SHA-256 hash for every file.
  3. Rebuild. Recreate the site as a separate Eleventy project, keeping article bodies as HTML rather than converting them to Markdown.
  4. Verify. Compare each generated file against the manifest.
  5. Baseline commit. Commit the matching output before any design change.

All 20 deployed files matched the originals byte for byte.

Quirks worth knowing about

The rebuild kept some oddities on purpose: two versions of the Uses page, two 404 pages, and a literal template placeholder in an old error page. That placeholder is the real hazard. If a template engine ever processes it, the visible output changes unless the text is escaped.

What can and can’t come back

Original Markdown sources and Git history cannot be recovered from rendered HTML. The words, links, assets and public routes can. Keeping the articles as HTML avoids a conversion step that could silently alter content.

The redesign happens separately, so the reconstruction never replaces the production site.