Closed leonbe02 closed 9 years ago
hey @leonbe02! Pleasure to meet you! How similar is this to #39?
somewhat similar. I'd like to be able to glob the templateData and output fields and have just one template.
have you tried to do this with 1.0.1? what happens currently? I'd be more than happy to land changes to make it nessecary
Using 1.0.1, it will create a single file called 'h.b.s.html' in the dist folder
Files are currently generated on a per-template basis; needs to be switched to a per-output basis. Will look into changing this today and submitting a pull request.
fixed with f57ee7c3ec8f2107956f26b5655932d3e3ca839d
(thanks, @timhettler!)
I am a web developer for Nintendo and I am looking for a way to have one template with multiple JSON data files that will be used to create different variations of HTML from that template and outputted in the same directory structure as the input JSON files.
For example:
template: 'src/templates/index.hbs', templateData: 'src/data/*/.json', output: 'dist/*/.html'
Reason: A lot of our websites are static pages with tabs to show different content on the page. For SEO purposes, we would rather not use AJAX to populate the content so we have multiple HTML files instead that are all essentially copy/paste except for the content in the middle. Having one template and multiple JSON would significantly decrease our development time on many of these sites.
I'm going to work on contributing this to the project unless someone already has a branch/fork that accomplishes this.