1

Is there a way to add an additional CSS-File to theme?

In default_head_blocks.xml I added my css file via

<css src="css/override.css" />

My shop therefore looks for

domain.tld/pub/static/frontend/[vendor]/[theme]/[locale]/css/override.css

I added the file override.css in [Vender]/[Theme]/web/css/override.css and used setup:static-content:deploy to build my theme. But then, the override.css doesn't appear in pub/static/frontend/[vendor]/[theme]/[locale]/css/

What did I missed to do?

  • Ok, after few trying I used "--verbose" to get more output: It seems that my file (symlink) doesn't seem to be a file: Magento\Framework\Filesystem\Directory\Write->assertIsFile() throws an error. More soon – Kevin Krieger Jan 18 '16 at 15:53
1

Problem was my pre-build of my magento2 box:

I used modman to link external template directory in magento2 app\design\frontend\

If I used copy as modman deployment strategy setup:static-content:deployworks fine.

So use modman deploy-all --copy --force as command .

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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