Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Commit 9c2ff57

Browse files
committed
fix: adapt breaking changes of updated dev dependencies
1 parent d60d3e1 commit 9c2ff57

File tree

4 files changed

+53
-6
lines changed

4 files changed

+53
-6
lines changed

gulp/tasks/handlebars.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import gulpsmith from 'gulpsmith';
55
const layouts = require('metalsmith-layouts');
66
const inPlace = require('metalsmith-in-place');
77
const registerHelpers = require('metalsmith-register-helpers');
8+
const registerPartials = require('metalsmith-discover-partials');
89

910
import {settings, useHandlebars} from '../config';
1011

@@ -25,14 +26,14 @@ function handlebars(done) {
2526
.use(registerHelpers({
2627
directory: 'src/handlebars/helpers'
2728
}))
29+
.use(registerPartials({
30+
directory: 'src/handlebars/partials',
31+
pattern: /\.hbs$/
32+
}))
2833
.use(layouts({ // Wrap layouts around content pages
29-
engine: 'handlebars',
30-
rename: false,
3134
directory: 'src/handlebars/layouts',
3235
default: 'default.hbs',
33-
pattern: '*.hbs',
34-
partials: 'src/handlebars/partials',
35-
partialExtension: '.hbs'
36+
pattern: '*.hbs'
3637
}))
3738
.use(inPlace({ // Render handlebars content pages
3839
engineOptions: {

package-lock.json

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"jstransformer-handlebars": "^1.1.0",
6767
"merge-stream": "^1.0.1",
6868
"metalsmith": "^2.3.0",
69+
"metalsmith-discover-partials": "^0.1.0",
6970
"metalsmith-in-place": "^4.1.1",
7071
"metalsmith-layouts": "^2.1.0",
7172
"metalsmith-register-helpers": "^0.4.0",

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const dev = {
3939
},
4040
stats: {
4141
timings: true,
42-
version: false
42+
version: false,
43+
colors: true
4344
}
4445
};
4546

0 commit comments

Comments
 (0)