handlebars-webpack-plugin icon indicating copy to clipboard operation
handlebars-webpack-plugin copied to clipboard

Pages from subdirectories

Open RuBAN-GT opened this issue 8 years ago • 2 comments

Good afternoon! Can I generate pages from subdirectories from entry point with this plugin? I want to keep directory structure from entry and move it to output destination.

Thank you for your answer.

RuBAN-GT avatar Apr 19 '17 11:04 RuBAN-GT

Hi RuBAN.

You can set an entry file in any directory. Since version v1.0.0 you can also add multiple entry files as seen in the README:

new HandlebarsPlugin({
    // path to hbs entry file(s)
    entry: path.join(process.cwd(), "app", "src", "*.hbs"),

If this does not help, a more detailed description of your problem would be helpful.

Regards. sagold

sagold avatar May 13 '17 09:05 sagold

Hi @sagold,

what do you think about adding the possibility to return a filename too with resultHtml in onBeforeSave hook like I tested here: https://github.com/francbelak/handlebars-webpack-plugin/commit/09e21068bab045a4ed4f6146bceaf4d0a46908e5

I am having multiple entry files and need to keep a certain structure in my output destination. Is there a reason why it is not possible to overwrite the filepath currently?

Regards, Franky

francbelak avatar Feb 21 '18 14:02 francbelak