Closed andymcfee closed 11 years ago
I'll look into it today, thanks for reporting this
Ah, wait, I know why it's not working. The exclusions feature is for properties on the root context, like basename
, ext
, etc.
You should be able to do what you need with normal minimatch exclusion patterns:
Gruntfile.js
assemble: {
options: {
flatten: true,
layout: 'default.hbs',
layoutdir: '<%= yeoman.app %>/assemble/layouts',
assets: 'dist/img',
partials: ['<%= yeoman.app %>/assemble/partials/*.hbs'],
helpers: ['helper-path'],
plugins: ['permalinks'],
permalinks: {
structure: ':basename/index.html'
}
},
pages: {
files: {
'.tmp/': [
'<%= yeoman.app %>/assemble/pages/*.hbs',
'!<%= yeoman.app %>/**/404.*'
]
}
}
},
Let me know if this works for you
Great, I've got it working now. I swear I tried it a similar way to this once before... Must have had a syntax error or something..
Thanks for your help!
No worries! I'm happy to help
I have a small project where I have 3 pages:
I'm using assemble permalinks to get a
:basename/index.html
structure. Works great for index.hbs and about.hbs. But I want 404.hbs to put 404.html in the root, not404/index.html
.This is my current configuration:
Folder structure
Gruntfile.js
But it still builds the 404 page to `404/index.html
I tried moving the permalinks options into the pages target like so:
But then permalinks didn't work at all.
I'm sure I'm going something wrong here, but I've tried everything. Thanks in advance for any help.