A Metalsmith plugin for extracting snippets from files.
npm install metalsmith-snippet --save
Metalsmith Snippets adds a
snippet property to the metadata of every HTML file, when it hasn't already been set.
Install via npm and then add
metalsmith-snippet to your
var snippet =metalsmith
You can define a custom snippet in your file when you want to provide something more advanced than the auto-generated snippet.
---title: Example Articlesnippet: This is a snippet about my article.---
<pre>element from snippet calculation (default: