f865336c89
--------- Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
16 lines
450 B
HTML
16 lines
450 B
HTML
{%- comment -%}
|
|
Get post description or generate it from the post content.
|
|
{%- endcomment -%}
|
|
|
|
{%- assign max_length = include.max_length | default: 200 -%}
|
|
|
|
{%- capture description -%}
|
|
{%- if post.description -%}
|
|
{{- post.description -}}
|
|
{%- else -%}
|
|
{%- include no-linenos.html content=post.content -%}
|
|
{{- content | markdownify | strip_html -}}
|
|
{%- endif -%}
|
|
{%- endcapture -%}
|
|
|
|
{{- description | strip | truncate: max_length | escape -}}
|