From ee61f8fff8dcd708eb6aa6c0aefb889cec97cae8 Mon Sep 17 00:00:00 2001 From: yann Date: Sat, 18 Apr 2026 17:12:15 +0200 Subject: [PATCH] post-summary.html --- _includes/post-summary.html | 6 +----- assets/js/data/search.json | 7 +++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/_includes/post-summary.html b/_includes/post-summary.html index c9314fc..6a6efeb 100644 --- a/_includes/post-summary.html +++ b/_includes/post-summary.html @@ -28,12 +28,8 @@ | replace: '
', ' ' | strip_newlines | strip + | truncate: 200 -%} - {%- unless include.full_text -%} - {%- assign max_length = include.max_length | default: 200 -%} - {%- assign content = content | truncate: max_length -%} - {%- endunless -%} - {{- content -}} {%- endif -%} diff --git a/assets/js/data/search.json b/assets/js/data/search.json index a12472c..4ab6bde 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -1,5 +1,6 @@ --- -layout: none +layout: compress +swcache: true --- [ {% for post in site.posts %} @@ -8,7 +9,9 @@ layout: none "categories" : "{{ post.categories }}", "tags" : "{{ post.tags | join: ', ' }}", "url" : "{{ site.baseurl }}{{ post.url }}", - "date" : "{{ post.date }}" + "date" : "{{ post.date }}", + {% capture content -%}{% include post-summary.html full_text=true %}{%- endcapture -%} + "content": {{ content | jsonify }} } {% unless forloop.last %},{% endunless %} {% endfor %} ]