Art-directed blog posts
In fact it is very easy and a great way to create custom designs for individual pages without having to build additional templates. Here is how it is done:
Afterwards go to the header snippet for your site
(by default this is
What we want to do is to include our stylesheet and script files in the head section of our html and it's just a few lines of code to do that.
What we are doing here is to get all files in our content folder and filter them by extension. This will result in a set of .css files and a set of .js files, so we use a
foreach loop to load each of them. This means that we could easily have more css or js files if we want – oh wait I already said that before :)
css($url) is a handy little helper function, which will automatically take the passed url and build a proper css link for it:
<link rel="stylesheet" type="text/css" media="all" href="http://theurltothestylesheet.com" />
And that's it!! Now you got a very easy way to create art-directed posts or custom styles for individual pages.