So, you’re hooked on the idea of using a CSS preprocessor, and you’re thinking of even managing your files in Tridion. Not a bad idea, right? But uploading those binaries into a multimedia schema isn’t as easy as it looks. So what’s a guy to do?
All I want to demonstrate is a proper way to add a
.styl file in Tridion. Maybe you want your preprocessed CSS to be part of Tridion’s archives. Maybe you want to build a Tridion TBB that processes your CSS. Maybe you just need to look 5% cooler than the Tridion geek sitting next to you, or maybe there’s a Tridion geekette you really need to impress after you spilled your caramel machiato vanilla whole milk soy latte on your pants. I’m not judging you.
The first thing we want to do is get to the administration tab from the side panel. So click on that
Once we’re in the Administration tab, we need to go to the Multimedia Types page. So click Multimedia Types from that ribbon and let’s get moving.
Once we’re on the Multimedia Types page, there’s another item in the dropdown menu on that Multimedia Types button. So click that icon and then select “New Multimedia Type”.
Now we’re where the magic happens. We want to add a new multimedia type — in my case one for my Stylus files. If CSS’ name is
Cascading Style Sheet, then I’m giving my Stylus file the name
Stylus Style Sheet ’cause, you know…consistency. The mime type is the same as CSS:
text/css. Finally, the file extension is
So what’s next
Nothing much. Tridion now recognizes your CSS preprocessor file extensions. This is a necessary step before you create a multimedia schema for your stylesheets, or doing any sort of fancy witchcraft.