Reputation: 1
I cant get Assemble to get correct index.json to correct index.hbs file. With this setup it takes only the last index.json file to populate both my index.hbs files.
Is this url structure possible with Grunt and Assemble?
I have a folder structure like this:
/src/pages/index.hbs
/src/pages/subfolder/index.hbs
and json data structure like
/src/data/index.json
/src/data/subfolder/index.json
and Gruntfile.js (assemble part) like this:
assemble: {
options: {
production: false,
expand: true,
site: '<%= pkg %>',
assets: 'dist/assets',
partials: ['src/includes/\*.hbs'],
helpers: ['src/helpers/helper-\*.js'],
layout: 'src/layouts/default.hbs',
data: ['src/data/\*\*/\*.json']
},
pages: {
expand: true,
cwd: 'src/pages',
src: ['\*\*/\*.hbs'],
dest: 'dist/'
}<br/>
}
Upvotes: 0
Views: 260
Reputation: 5111
The data in Assemble will merge together and be available at the top level.
Two options that I know of -
Let me know if that helps.
Upvotes: 1