How to limit the number of words?

It is always not possible that the heading or the description will always be of the same size of we need to limit the number of words so that at the end we get three dots ...

How to do it?

You can do this with CSS.

Nope. I didn’t work for me. :confused:

maybe make an extra front matter variable for short description? jekyll also has post.excerpt, but I don’t think it is a good fit for what you want to do.

You could also do this in JS.

1 Like

You can generally do this:
{{ some_variable | truncatewords: 20 }}