Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

WordPress still powers a large portion of the web, but most new marketing sites today are built with Framer, Lovable, or custom React exports.

There is no straightforward way to take an exported marketing site and turn it into a proper WordPress theme with header.php, footer.php, functions.php, enqueue logic, and theme.json.

I built a pipeline that attempts to do a code-level transformation instead of a visual clone.

High-level approach:

Puppeteer renders and snapshots the full DOM.

Cheerio cleans and flattens the structure.

The first LLM pass labels semantic regions such as header, hero, content sections, and footer.

A second pass generates modular WordPress templates.

Deterministic Node scripts assemble the theme files and validate structure.

The result is packaged as an installable theme zip.

Originally I tried doing this in a single prompt. It was unreliable and brittle. Breaking the process into smaller bounded stages made it much more stable.

Early benchmarks:

Static HTML and CSS marketing sites: about 95 percent usable output Framer or Lovable marketing exports: around 90 to 95 percent Authenticated apps, dashboards, or backend driven sites: not supported

The scope is intentionally limited to public facing marketing sites. Client side state, auth flows, and custom application logic do not map cleanly to WordPress theme architecture.

Average runtime is about 20 seconds. Token cost per conversion is roughly 0.10 USD.

A few things I am curious about:

If you were auditing LLM generated WordPress theme code, what would you inspect first?

Given the shift toward block themes, does generating classic PHP templates still make sense long term?

Where would you expect a pipeline like this to fail first? Layout detection, asset handling, or template hierarchy?

Happy to go deeper into implementation details.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: