mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00

# Aider chat conversation: USER: use the excerpt if one exists, otherwise keep using the first 100 words ASSISTANT: ```diff --- blog/index.html +++ blog/index.html @@ ... @@ <div class="entry"> - {{ post.content | strip_html | truncatewords: 100 }}... + {{ post.excerpt | default: post.content | strip_html | truncatewords: 100 }}... </div> ```
18 lines
432 B
HTML
18 lines
432 B
HTML
---
|
|
layout: default
|
|
---
|
|
|
|
<div class="posts">
|
|
{% for post in site.posts %}
|
|
<article class="post">
|
|
|
|
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
|
|
|
|
<div class="entry">
|
|
{{ post.excerpt | default: post.content | strip_html | truncatewords: 100 }}...
|
|
</div>
|
|
|
|
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|