Page Specific assets with Jekyll
I ran across this post describing a way to implement page specific assets (CSS, Javascript, etc…).
I have the hightlights below (for my notes).
Add the following to the _includes/head.html
(if you’re using the default Jekyll layout).
<head>
...
{% raw %}
{% if page.page_css %}
{% for page_file in page.page_css %}
<link rel="stylesheet" href="{{ site.baseurl }}/{{ page_file }}" media="screen" type="text/css">
{% endfor %}
{% endif %}
...
{% if page.page_import %}
{% for page_file in page.page_import %}
<link rel="import" href="{{ site.baseurl }}/{{ page_file }}">
{% endfor %}
{% endif %}
...
{% if page.page_js %}
{% for page_file in page.page_js %}
<script type="text/javascript" src="{{ site.baseurl }}/{{ page_file }}"></script>
{% endfor %}
{% endif %}
{% endraw %}
...
</head>