Consider these instead:
A batteries-included distribution of metalsmith available as a plugin.
Metalsmith is a very useful static-site generator with almost all functionality provided by plugins. Most of the time, you will need the same set of functionality out of a site builder:
-
CSS (
metalsmith-sense/sass
):- compile using a modern pre-processor when needed. (*.sass, *.styl)
- don't worry about vendor prefixes. (autoprefixer)
- compress in production.
-
HTML (
metalsmith-sense/html
):- compile from modern templating languages. (handlebars, jade)
- support Markdown.
- allow HTML classes with markdown-it-decorate.
- support for layout templates. (layouts/)
- support for partials. (partials/)
Compatible with Metalsmith 2.x.
This module provides 3 Metalsmith plugins:
metalsmith-sense/sass
- for Sass compilation and suchmetalsmith-sense/html
- for Markdown/Jade/Handlebars, layouts, etcmetalsmith-sense
- combination of both
You can use them in metalsmith.json
:
{
"plugins": {
"metalsmith-sense/sass": {},
"metalsmith-sense/html": {}
}
}
Or via JavaScript:
var app = Metalsmith(__dirname)
.source('./src')
.destination('./public')
.use(require('metalsmith-sense')())
// or use them separately:
.use(require('metalsmith-sense/sass')())
.use(require('metalsmith-sense/html')())
Available options:
sass
— (Object) options to pass onto the Sass parsermarkdown
— (Object) options to pass onto markdown-it. defaults tohtml: true, typographer: true
engine
— (String) either'jade'
or'handlebars'
. defaults to handlebars.partials
— (String) directory for handlebars partials. defaults topartials
metalsmith-sense © 2015+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).
ricostacruz.com · GitHub @rstacruz · Twitter @rstacruz