@@ -181,23 +181,21 @@ var patternlab_engine = function (config) {
181
181
182
182
//set user defined head and foot if they exist
183
183
try {
184
- patternlab . userHead = pattern_assembler . findPartial ( 'atoms-_00-head' , patternlab ) ;
185
- patternlab . userHead . extendedTemplate = patternlab . userHead . template ;
184
+ patternlab . userHead = fs . readFileSync ( path . resolve ( paths . source . root , '_meta' , '_00-head.mustache' ) , 'utf8' ) ;
186
185
}
187
186
catch ( ex ) {
188
187
if ( patternlab . config . debug ) {
189
188
console . log ( ex ) ;
190
- console . log ( 'Could not find optional user-defined header, atoms-head pattern . It was likely deleted.' ) ;
189
+ console . log ( 'Could not find optional user-defined header, usually found at ./source/_meta/_001-head.mustache . It was likely deleted.' ) ;
191
190
}
192
191
}
193
192
try {
194
- patternlab . userFoot = pattern_assembler . findPartial ( 'atoms-_01-foot' , patternlab ) ;
195
- patternlab . userFoot . extendedTemplate = patternlab . userFoot . template ;
193
+ patternlab . userFoot = fs . readFileSync ( path . resolve ( paths . source . root , '_meta' , '_01-foot.mustache' ) , 'utf8' ) ;
196
194
}
197
195
catch ( ex ) {
198
196
if ( patternlab . config . debug ) {
199
197
console . log ( ex ) ;
200
- console . log ( 'Could not find optional user-defined footer, atoms -foot pattern . It was likely deleted.' ) ;
198
+ console . log ( 'Could not find optional user-defined footer, usually found at ./source/_meta/_01 -foot.mustache . It was likely deleted.' ) ;
201
199
}
202
200
}
203
201
@@ -216,7 +214,7 @@ var patternlab_engine = function (config) {
216
214
//set pattern-specific header if necessary
217
215
var head ;
218
216
if ( patternlab . userHead ) {
219
- head = patternlab . userHead . extendedTemplate . replace ( '{% pattern-lab-head %}' , patternlab . header ) ;
217
+ head = patternlab . userHead . replace ( '{% pattern-lab-head %}' , patternlab . header ) ;
220
218
} else {
221
219
head = patternlab . header ;
222
220
}
@@ -247,7 +245,8 @@ var patternlab_engine = function (config) {
247
245
console . log ( err ) ;
248
246
}
249
247
allData = plutils . mergeData ( allData , pattern . jsonFileData ) ;
250
- var headHTML = pattern_assembler . renderPattern ( patternlab . userHead , allData ) ;
248
+ //var headHTML = pattern_assembler.renderPattern(patternlab.userHead, allData);
249
+ var headHTML = pattern_assembler . renderPattern ( pattern . header , allData ) ;
251
250
252
251
//render the extendedTemplate with all data
253
252
pattern . patternPartialCode = pattern_assembler . renderPattern ( pattern , allData ) ;
0 commit comments