metalsmith-sense

A batteries-included distribution of metalsmith available as a plugin.

For
Last updated 5 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-sense 
SYNC missed versions from official npm registry.

metalsmith-sense

A batteries-included distribution of metalsmith available as a plugin.

Status

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.

Documentation →


API

This module provides 3 Metalsmith plugins:

  • metalsmith-sense/sass - for Sass compilation and such
  • metalsmith-sense/html - for Markdown/Jade/Handlebars, layouts, etc
  • metalsmith-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 parser
  • markdown(Object) options to pass onto markdown-it. defaults to html: true, typographer: true
  • engine(String) either 'jade' or 'handlebars'. defaults to handlebars.
  • partials(String) directory for handlebars partials. defaults to partials

Thanks

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

Current Tags

  • 0.6.0                                ...           latest (5 years ago)

7 Versions

  • 0.6.0 [deprecated]           ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |