metalsmith / excerpts

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

excerpt can be now returned without surround <p> #16

Closed ainthek closed 2 years ago

ainthek commented 8 years ago

please consider this as an enhancement, sometimes we need the excerpt as text (or inner HTML without the surrouding

", I have added optional option.selector, which can have now only one value innerHTML, if specified, it does return innerHTML, if not it returns the same as before.

Thanx

brunoscopelliti commented 8 years ago

Hi there mantainers. Thank you for your work.

I was considering exactly this question, and eventually proposing a pull request for this feature... Pretty strange considering this was opened 11h ago :)

I think we need this pull request merged because there is an inconsistency here: when we get the excerpt from the front matter we get plain text; otherwise when there isn't the "excerpt" prop in the front matter we get the text surrounded by the <p> ...</p> html.

Even if the plain text one is the one that is more flexible, I've not a particular preference between the two versions, but consistency is definitely something important.

Let me know if is there something i can do to help.

dpisklov commented 6 years ago

Is there anyone looking after this repo? I really need this PR too...

webketje commented 2 years ago

Will be accounted for in next release see https://github.com/metalsmith/excerpts/issues/42