mirror of
https://github.com/cotes2020/chirpy-starter.git
synced 2025-07-02 20:38:58 +10:00
fix: update layout and import Chirpy template files
This commit is contained in:
16
_includes/post-description.html
Normal file
16
_includes/post-description.html
Normal file
@ -0,0 +1,16 @@
|
||||
{%- 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 -}}
|
Reference in New Issue
Block a user