Use excerpt blocks for all posts
This commit is contained in:
parent
a813a83317
commit
6ad54f56d7
32 changed files with 130 additions and 16 deletions
|
@ -19,13 +19,17 @@ use: [posts]
|
|||
|
||||
{% include 'post/intro-image' with { page: post } %}
|
||||
|
||||
{% if post.blocks.excerpt %}
|
||||
{{ post.blocks.excerpt|raw }}
|
||||
{% else %}
|
||||
<p>{{ post.blocks.content|raw|striptags|split(' ')|slice(0,50)|join(' ')|replace({ 'h2': 'h3' }) }} …</p>
|
||||
{% endif %}
|
||||
<div class="mb-4">
|
||||
{% if post.blocks.excerpt %}
|
||||
{{ post.blocks.excerpt|markdown }}
|
||||
{% else %}
|
||||
{{ post.blocks.content|markdown }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p><a href="{{ post.url }}">Read more →</a></p>
|
||||
<p>
|
||||
<a href="{{ post.url }}">Read more →</a>
|
||||
</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue