2

How can i truncate only text (paragraphs) exceeding limit of 1000 bytes, ignoring for example img and script tags?

To get correct post size, i'm using this:

{% assign count = page.content | strip_html %}

But to cut text i tried truncate and truncate words filters, in both ways it will cut everything over the limit.

Any ideas?

Jack
  • 1,521
  • 4
  • 21
  • 29

0 Answers0