Closed robertdenton closed 10 years ago
So I can put this in my _config.yml per Jekyll configuration docs...
_config.yml
defaults: - scope: path: "" values: postimage: "default.png"
AND I can set postimage in head matter like so..
postimage
postimage: "default.gif"
BUT it only pulls the head matter postimage not the default.
Solution:
There isn't one. Github is on Jekyll 1.5 and Jekyll 2 and up supports defaults. So I did this as a fix:
{% if post.postimage %} <img src="http://pages.registerguard.com/{{ post.slug }}/{{ post.postimage }}" width="100%" style="border:1px solid black"> {% else %} <img src="http://pages.registerguard.com/{{ post.slug }}/default.png" width="100%" style="border:1px solid black"> {% endif %}
So I can put this in my
_config.yml
per Jekyll configuration docs...AND I can set
postimage
in head matter like so..BUT it only pulls the head matter
postimage
not the default.Solution:
There isn't one. Github is on Jekyll 1.5 and Jekyll 2 and up supports defaults. So I did this as a fix: