{% macro render(post, from_index=false, from_sidebar=false, from_feed=false, nth=0) -%}
{%- if from_index or from_sidebar %}

{{ post.title }}

{%- elif not from_feed %}

{{ post.title }}

{%- endif %} {%- if not from_feed %}

{%- if post.guest_author -%} by {{ post.guest_author }} | {{ post.pub_date.strftime('%B %-d, %Y') }} {%- else -%} by {{ post.author }} | {{ post.pub_date.strftime('%B %-d, %Y') }} {%- endif -%}

{%- endif %} {%- if not from_sidebar %} {%- if from_index %} {%- if post.pub_date > default_image_cutoff -%} {{ image_sources(post) }} 3 %}loading="lazy" {% endif %}src="{{ image_url(post) }}"> {%- elif image_url(post, fallback=false) -%} {{ image_sources(post, fallback=false) }} 3 %}loading="lazy" {% endif %}src="{{ image_url(post) }}"> {%- endif -%} {%- elif from_feed %} {{ image_sources(post, external=True) }} {%- else %} {{ image_sources(post) }} {%- endif %} {%- endif %} {%- if from_index or from_sidebar %} {{- render_summary(post) }} {%- else %}
{%- if post.body %} {%- if post.guest_author -%} This is a guest post by {{ post.guest_author }}. {%- endif -%} {{ post.body }} {%- else %} {{ post._html_body }} {%- endif %}
{%- endif -%} {%- if post.categories and not from_sidebar %}
{%- endif %} {%- if not from_sidebar and not from_index and not from_feed and post.is_discoverable %}

Comments

{%- if post._html_body %} {%- if post._comments %}

Please note that the comment area below has been archived.

{{ post._comments }} {%- else %}

Comments are closed.

{%- endif %} {%- else %}

We encourage respectful, on-topic comments. Comments that violate our Code of Conduct will be deleted. Off-topic comments may be deleted at the discretion of the moderators. Please do not comment as a way to receive support or to report bugs on a post unrelated to a release. If you are looking for support, please see our FAQ, user support forum or ways to get in touch with us.

{%- endif %}
{%- endif %}
{% endmacro %} {% macro image_url(post, external=False, fallback=True) -%} {% if post.attachments.images.get('lead.png') -%} {% set image = post.attachments.images.get('lead.png') -%} {% elif post.attachments.images.get('lead.jpg') -%} {% set image = post.attachments.images.get('lead.jpg') -%} {% elif post.attachments.images.get('lead.gif') -%} {% set image = post.attachments.images.get('lead.gif') -%} {% elif fallback -%} {% set image = '/static/images/lead.png' -%} {% endif -%} {% if image and external -%} {{ url_to(image, external=True) -}} {% elif image -%} {{ url_to(image) -}} {% endif -%} {% endmacro %} {% macro image_sources(post, external=False, fallback=True) -%} {%- if fallback and not post.attachments.images.get('lead.png') and not post.attachments.images.get('lead.jpg') and not post.attachments.images.get('lead.gif') -%} {% else -%} {% if post.attachments.get('lead.webp') -%} {% endif -%} {% if post.attachments.get('lead_small.webp') -%} {% endif -%} {% endif -%} {% endmacro %} {% macro render_summary(post) -%} {%- if post.summary %} {{ post.summary }} {%- elif post._html_body.find("") > -1 %} {{ post._html_body.split("")[0] }} {%- elif post.body %} {{ post.body|truncate(100) }} {%- else %}

{{ post._html_body|striptags|truncate(100) }}

{%- endif %} {% endmacro %}