{%- comment -%} Get the post's description or body content. Arguments: full_text: If true, return the full content. Default is false. max_length: The maximum length of the returned content. Default is 200. {%- endcomment -%} {%- if post.description and include.full_text != true -%} {{- post.description -}} {%- else -%} {%- comment -%} Remove the line numbers from the code snippet. {%- endcomment -%} {%- assign content = post.content -%} {%- if content contains '
' -%}
{%- assign content = content
| replace: '',
'' -%}
{%- endif -%}
{%- assign content = content
| markdownify
| strip_html
| newline_to_br
| replace: '
', ' '
| strip_newlines
| strip
-%}
{%- unless include.full_text -%}
{%- assign max_length = include.max_length | default: 200 -%}
{%- assign content = content | truncate: max_length -%}
{%- endunless -%}
{{- content -}}
{%- endif -%}