markdown-summary

extract summary/preview text from markdown

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
markdown-summary
801.0.36 years ago6 years agoMinified + gzip package size for markdown-summary in KB

Readme

markdown-summary
extract useful things like a title, a summary, and a preview image from a freeform markdown post.
var msum = require('markdown-summary')

var title = msum.title(text) //the first line, or the first 80 chars or so
var summary = msum.summary(text) //the next line, or the rest of the first line (if a whole paragraph)
var image = msum.image(text) //the first embedded image ![...](...)

License

MIT