Skip to content

Commit 647eea8

Browse files
committed
perf: truncate post content for search results
1 parent 1c330f4 commit 647eea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/data/search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ swcache: true
1212
"tags": {{ post.tags | join: ', ' | jsonify }},
1313
"date": "{{ post.date }}",
1414
{% include no-linenos.html content=post.content %}
15-
"snippet": {{ content | strip_html | strip_newlines | jsonify }}
15+
"snippet": {{ content | strip_html | strip_newlines | truncate: 200 | jsonify }}
1616
}{% unless forloop.last %},{% endunless %}
1717
{% endfor %}
1818
]

0 commit comments

Comments
 (0)