Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metalsmith-templates

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-templates

A metalsmith plugin to render files with templates.

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

metalsmith-templates

A metalsmith plugin to render files with templates.

You can use any templating engine supported by consolidate.js.

Installation

$ npm install metalsmith-templates

CLI Usage

Install the node modules and then add the metalsmith-templates key to your metalsmith.json plugins. The simplest use case just requires the template engine you want to use:

{
  "plugins": {
    "metalsmith-templates": "handlebars"
  }
}

If you want to specify additional options, pass an object:

{
  "plugins": {
    "metalsmith-templates": {
      "engine": "handlebars",
      "directory": "templates"
    }
  }
}

Javascript Usage

For the simplest use case, just pass your templating engine:

var templates = require('metalsmith-templates');

metalsmith.use(templates('swig'));

To specify additional options:

metalsmith.use(templates({
  engine: 'swig',
  directory: 'templates'
}));

License

MIT

FAQs

Package last updated on 30 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc