Last active
November 18, 2017 12:40
-
-
Save slavafomin/eee7293a9c71d3d654ff11f6d9926c5f to your computer and use it in GitHub Desktop.
Nunjucks integration with Metalsmith
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Metalsmith = require('metalsmith'); | |
const inPlace = require('metalsmith-in-place'); | |
Metalsmith(__dirname) | |
.source('./src') | |
.destination('./build') | |
.use(inPlace({ | |
pattern: '**/*.njk', | |
engineOptions: { | |
path: __dirname + '/src' | |
} | |
})) | |
.build(function (error) { | |
if (error) { | |
throw error; | |
} | |
}) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an example for my article: Making Metalsmith to work with Nunjucks.