Can I create a new .css file and call it in the header of my theme?

Hi!

I know about Code Injection and love it, but still I’d like to add most of what’s there in a separate .CSS file and call it in the header.

Since I’m using Casper, I though about adding the file inside /assets/css and then editing default.hbs, near {{ghost_head}}.

Is it possible?

Yes. Note that files in the assets directory should be accessed using the {{asset}} helper, which handles cache expiration for you. But yes, you can absolutely link additional css files. Everything in your HBS files goes to the browser as HTML after rendering, so you have lots of latitude to change what’s in default.hbs (or elsewhere) to get the HTML you want sent to the browser.

2 Likes