{% if page.type == "post" %} {% capture imagePath %}{{ page.date | date: "%Y-%m-%d" }}-{{ page.title | slugify }}/{{ include.name }}{% endcapture %} {% capture directory %}posts{% endcapture %} {% elsif page.type == "project" %} {% capture imagePath %}{{ page.title | slugify }}/{{ include.name }}{% endcapture %} {% capture directory %}projects{% endcapture %} {% endif %} {% if include.caption %}
{{ include.alt }}
{{ include.caption }}
{% else %} {{ include.alt }} {% endif %}