metalsmith / excerpts

A Metalsmith plugin to extract an excerpt from HTML files.
MIT License
24 stars 26 forks source link

More precise excerpt selection #11

Open danielhusar opened 9 years ago

danielhusar commented 9 years ago

What you guys thinks about adding functionality to specify either number of paragraphs to take, or minimum characters. (so if first paragraph have less than minimum characters, take also next one and so on..)

I can prepare PR if you are interested in it.

woodyrew commented 6 years ago

A PR would be welcome. It would be good to maintain the API and add the functionality via a switch.

webketje commented 2 years ago

I would add option truncate: stringthat would truncate the snippet to a max. of n characters and add an ellipsis (...). The truncate option could take an instruction string like 50 words/100 chars/1 sentence/ comment. comment would refer to #41. I don't think specifying a minimum is a common need for an excerpt.