Metalsmith plugin setting the extension of processed files.
Homepage Repository npm Download
npm install @escio/metalsmith-set-extension@1.0.0
Metalsmith plugin setting the extension of processed files
$ npm install @escio/metalsmith-set-extension
The plugin has a single parameter, the extension you wish to set on the processed files. The existing extension is overwritten.
const metalsmith = require('metalsmith');
const setExtension = require('@escio/metalsmith-set-extension');
metalsmith(
__dirname
).use(
// Set the extension of all processed files to .html
setExtension('.html')
).build((err) => {
if (err) {
throw err;
}
});
ISC © Escio AS