Writing / Note
Recovering a site when only the HTML remains
Take a byte-level baseline first, then separate content from the repeated page shell.
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
- Snapshot. Copy the whole production directory somewhere outside the web root.
- Manifest. Record a SHA-256 hash for every file.
- Rebuild. Recreate the site as a separate Eleventy project, keeping article bodies as HTML rather than converting them to Markdown.
- Verify. Compare each generated file against the manifest.
- 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.