Last active
April 20, 2018 06:45
-
-
Save spencermathews/7a9026518425f7e9992e03198db3d7bc to your computer and use it in GitHub Desktop.
Jekyll snippets
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 site.custom_css %} | |
{% for stylesheet in site.custom_css %} | |
<link rel="stylesheet" href="{{ stylesheet }}" media="screen"> | |
{% endfor %} | |
{% endif %} | |
{% if page.custom_css %} | |
{% for stylesheet in page.custom_css %} | |
<link rel="stylesheet" href="{{ stylesheet }}" media="screen"> | |
{% endfor %} | |
{% endif %} | |
{% if site.custom_js %} | |
{% for js_file in site.custom_js %} | |
<script src='{{ js_file }}'></script> | |
{% endfor %} | |
{% endif %} | |
{% if page.custom_js %} | |
{% for js_file in page.custom_js %} | |
<script src='{{ js_file }}'></script> | |
{% endfor %} | |
{% endif %} |
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
{% comment %} | |
Get the directory containing a page/post | |
{% endcomment %} | |
{% assign path_split = page.path | split: '/'' | pop %} | |
{% assign directory = path_split | join: '/' | prepend: '/' %} |
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
Jekyll tips, tricks, and snippets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment