This repository was archived by the owner on Oct 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 72
72
"jstransformer-handlebars" : " ^1.1.0" ,
73
73
"merge-stream" : " ^1.0.1" ,
74
74
"metalsmith" : " ^2.3.0" ,
75
+ "metalsmith-discover-partials" : " ^0.1.0" ,
75
76
"metalsmith-in-place" : " ^4.1.1" ,
76
77
"metalsmith-layouts" : " ^2.1.0" ,
77
78
"metalsmith-register-helpers" : " ^0.4.0" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import gulpsmith from 'gulpsmith';
5
5
const layouts = require ( 'metalsmith-layouts' ) ;
6
6
const inPlace = require ( 'metalsmith-in-place' ) ;
7
7
const registerHelpers = require ( 'metalsmith-register-helpers' ) ;
8
+ const registerPartials = require ( 'metalsmith-discover-partials' ) ;
8
9
9
10
import { settings , useHandlebars } from '../config' ;
10
11
@@ -25,14 +26,14 @@ function handlebars(done) {
25
26
. use ( registerHelpers ( {
26
27
directory : 'src/handlebars/helpers'
27
28
} ) )
29
+ . use ( registerPartials ( {
30
+ directory : 'src/handlebars/partials' ,
31
+ pattern : / \. h b s $ /
32
+ } ) )
28
33
. use ( layouts ( { // Wrap layouts around content pages
29
- engine : 'handlebars' ,
30
- rename : false ,
31
34
directory : 'src/handlebars/layouts' ,
32
35
default : 'default.hbs' ,
33
- pattern : '*.hbs' ,
34
- partials : 'src/handlebars/partials' ,
35
- partialExtension : '.hbs'
36
+ pattern : '*.hbs'
36
37
} ) )
37
38
. use ( inPlace ( { // Render handlebars content pages
38
39
engineOptions : {
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ const dev = {
39
39
} ,
40
40
stats : {
41
41
timings : true ,
42
- version : false
42
+ version : false ,
43
+ colors : true
43
44
}
44
45
} ;
45
46
You can’t perform that action at this time.
0 commit comments