Remove split, use excerpt block
This commit is contained in:
parent
aaa72e2186
commit
0858c7b6d5
10 changed files with 36 additions and 12 deletions
|
@ -21,8 +21,6 @@ use: [posts]
|
|||
|
||||
{% if post.blocks.excerpt %}
|
||||
{{ post.blocks.excerpt|raw }}
|
||||
{% elseif '<!-- split -->' in post.blocks.content %}
|
||||
{{ post.blocks.content|split('<!-- split -->')|first|raw }}
|
||||
{% else %}
|
||||
<p>{{ post.blocks.content|raw|striptags|split(' ')|slice(0,50)|join(' ')|replace({ 'h2': 'h3' }) }} …</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue