{% assign post_filename = page.path | split: "." | first | remove_first: "_posts/" %}
{% capture post_images_folder %}/_images/post_images/{{ post_filename }}{% endcapture %}
{% assign post_images_array = "" | split: ',' %}
{% for image in site.static_files %}
{% assign image_folder = image.path | split: "/" | pop | join: "/" %}
{% if image_folder == post_images_folder %}
{% assign post_images_array = post_images_array | push: image %}
{% endif %}
{% endfor %}
{% for post_image in post_images_array %}
{% endfor %}
{% assign content = page.content | strip_newlines %}
{% if content != "" %}
{% if site.post_settings.show_title and page.show_title != false %}
{{ page.title }}
{% elsif site.post_settings.show_title == false and page.show_title %}
{{ page.title }}
{% endif %}
{% if site.post_settings.show_date == true %}
{{ page.date | date: '%d %B %Y' }}
{% endif %}
{{ content }}
{% if site.post_settings.show_title and page.show_title != false %}
{{ page.title }}
{% elsif site.post_settings.show_title == false and page.show_title %}
{{ page.title }}
{% endif %}
{% if site.post_settings.show_date == true %}
{{ page.date | date: '%d %B %Y' }}
{% endif %}