aider: Update blog index to display post excerpt if available, otherwise use the first 100 words.

# 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>
```
This commit is contained in:
Paul Gauthier 2024-02-11 07:52:29 -08:00
parent a3f9f6c5c6
commit d7476bb303

View file

@ -9,7 +9,7 @@ layout: default
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
<div class="entry">
{{ post.content | strip_html | truncatewords: 100 }}...
{{ post.excerpt | default: post.content | strip_html | truncatewords: 100 }}...
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>