0

I've created a theme in Magento 2, but when I'm trying to deploy my Magento site to a server, it's static files don't get generated. I've already tried the solution in error during deploying custom theme in magento 2, but that doesn't work for me.

What happens is when I run bin/magento setup:static-content-deploy, Magento goes and create the static content for Magento/blank and Magento/luma (and the adminhtml template), but not for my custom template.

registration.php:

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Happy/Foundation',
    __DIR__
);

Locally, in developer mode, everything works fine. Does anyone know what might be causing this?

1

Never mind, I already found the answer: it turns out Magento only renders themes when there is content in the web folder inside your template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.