Add the ext
property to both the options and object in the files array:
assemble: {
docs: {
options: {
layout: 'default.hbs',
ext: '.html'
},
files: [
{expand: true, cwd: 'src/pages', src: ['*.hbs'], dest: './tmp/', ext: '/index'}
]
}
}
And if you are using "double extensions", like .md.hbs
, also add this rename function:
assemble: {
docs: {
options: {
layout: 'default.hbs',
ext: '.html'
},
files: [
{expand: true, cwd: 'src/pages', src: ['*.hbs'], dest: './tmp/', ext: '/index',
rename: function(dest, src) {
return dest + src.substring(0, src.indexOf('.'));
}
}
]
}
}
What about
/index.html
? This will create an/index/index.html
file.