1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00
Files
jekyll-theme-chirpy/_includes/post-description.html
2024-03-18 18:50:05 +08:00

17 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 -}}