🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

metalsmith-include-content

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-include-content

A Metalsmith plugin that allows content to be included (nested) within other content by including the file path in the document.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Metalsmith Include Content NPM version

A Metalsmith plugin that allows content to be included (nested) within other content by including the file path in the document.

Continuous testing courtesy of travis-ci:

Build Status

Installation

This package can be installed through npm:

npm install metalsmith-include-content

Usage

JavaScript

If you are using the JS api for Metalsmith, then you can require the module and add it to your .use() directives:

var include = require('metalsmith-include-content');

Metalsmith()
  .use(include())
  .build(function(err) {

  });

CLI

If you are using the command-line version of Metalsmith, you can install via npm, and then add the metalsmith-include-content key to your metalsmith.json file:

{
  "plugins": {
    "metalsmith-include-content": {
      "pattern": "^include (.*)",
      "ignoreMissing": false
    }
  }
}

Options

The plugin allows you to override the default behaviour by passing in options.

  • pattern is the regular expression pattern that is used for finding includes
  • ignoreMissing allows you to show or hide warnings if the include file does not exist

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Keywords

metalsmith

FAQs

Package last updated on 16 Jan 2016

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