Skip to content

Instantly share code, notes, and snippets.

@galaakk
Last active December 15, 2015 16:48
Show Gist options
  • Save galaakk/5291436 to your computer and use it in GitHub Desktop.
Save galaakk/5291436 to your computer and use it in GitHub Desktop.
OCTOPRESS: Custom CSS per post
---
layout: default
title: New post
css: special
---
# Create a custom post tag named 'css' in your post and give it the name of the desired file as an attribute
{% if page.css %}
<link rel="stylesheet" href="/css/{{ page.css }}.css" type="text/css" />
{% endif %}
<!--
Put this in the head
In our exemple, it creates a link to include "special.css"
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment