Skip to content

A batteries-included distribution of Metalsmith.io available as a plugin

Notifications You must be signed in to change notification settings

rstacruz/metalsmith-sense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

Consider these instead:


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

About

A batteries-included distribution of Metalsmith.io available as a plugin

Resources

Stars

Watchers

Forks

Packages

No packages published