Created
May 3, 2012 14:33
-
-
Save elliotjaystocks/2586017 to your computer and use it in GitHub Desktop.
Art direct your blog posts in Harmony by inserting this loop into the <head> and injecting any extra CSS or JSS you might need by creating a field in your post template called 'injected_code'.
This file contains hidden or 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 item.root? %} | |
{{ 'blog' | item_from_path | assign_to: 'blog' }} | |
{% for post in blog.recent_posts.1 %} | |
<!-- Injected code from the latest blog post --> | |
{{ post.data.injected_code }} | |
{% endfor %} | |
{% else %} | |
<!-- Injected code from this specific blog post --> | |
{{ item.data.injected_code }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment