Last active
December 15, 2015 16:48
-
-
Save galaakk/5291436 to your computer and use it in GitHub Desktop.
OCTOPRESS: Custom CSS per post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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