
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
metalsmith-loader
Advanced tools
Loads Metalsmith as well as metalsmith plugins using globbing patterns similar to `load-grunt-task`
Loads Metalsmith as well as multiple metalsmith plugins using globbing patterns
This plugin takes reference from / works similarly to load-grunt-task, allowing you to read the dependencies/devDependencies/peerDependencies in your package.json and load metalsmith plugins that matches the provided patterns.
Usually you would have to load each plugin one by one, which is unnecessarily cumbersome.
That aside, it also gives an option to load metalsmith library itself.
var Metalsmith = require('metalsmith');
var drafts = require('metalsmith-drafts');
var permalinks = require('metalsmith-permalinks');
var collections = require('metalsmith-collections');
require('metalsmith-loader')();
Install with npm: npm install --save-dev metalsmith-loader
Simplest use case:
var config = require('metalsmith-loader')();
Metalsmith(__dirname).use(config.collections());
or if you want it global:
require('metalsmith-loader')({global: true);
Metalsmith(__dirname).use(collections());
To specify additional options:
require('metalsmith-loader')({
core: true,
pattern: 'metalsmith-*',
config: '../package.json',
scope: 'devDependencies',
global: true
});
core (optional)Type: boolean
Default: false
Determines if metalsmith should be loaded.
pattern (optional)Type: String|Object
Default: metalsmith-*
By default metalsmith-* will be used as the globbing pattern.
config (optional)Type: String|Object
Default: Path to nearest package.json
scope (optional)Type: String|Array
Default: ['dependencies', 'devDependencies', 'peerDependencies']
global (optional)Type: boolean
Default: false
Determines if plugin should require modules into the global variable environment or put the modules into a return object / dictionary.
FAQs
Loads Metalsmith as well as metalsmith plugins using globbing patterns similar to `load-grunt-task`
We found that metalsmith-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.