Skip to content

How to keep the original directory structure? #20

Description

@hlassiege

Hi,

I'm new to assemble and I try to use it to generate a static website on github.
We have a directory structure for our *.hbs files like this :

pages
`---- file1.hbs
`---- folder
        `---- file2.hbs

When I use assemble, all files are read and then copied into the same folder.
I don't understand how to keep the original structure.
In the documentation there is a reference to a "flatten" option but it's only available for grunt (http://assemble.io/docs/Options.html).

Is there something else available with gulp ?

gulp.task('assemble', function () {
    return gulp.src('app/templates/pages/**/*.hbs')
        .pipe($.plumber())
        .pipe($.assemble({
            flatten: false,    // no effect
            data: 'data/*.json',
            partials: 'app/templates/partials/*.hbs',
            layoutdir: 'app/templates/layouts/'
        }).on("error", gutil.log))
        .pipe(gulp.dest('.tmp/'));
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions