GitbookIO / plugin-autocover

Generate a cover for the book
Apache License 2.0
88 stars 28 forks source link

Use template engine #2

Closed piranna closed 9 years ago

piranna commented 10 years ago

The plugin currently works as a hard-coded template, where the data is given in json. I propose to use a real template engine instead like ejs or jade or mustache so it would be possible to use alternative templates with custom layouts and/or extra fields.

piranna commented 9 years ago

I've been investigating and a good convination would be to use svg-templater for templates (it's build over lodash, that's already used by autocover) and node-canvg for render the SVG to node-canvas, so we can reuse the autocover toolchain. This would allow more flexibility to use custom layouts and fields.

AaronO commented 9 years ago

@piranna If you want to submit a PR based on that idea, I would definitely take a look and consider merging it.

piranna commented 9 years ago

Yes, I'm thinking about to do it myself, let's see if I have some spare time :-)

AaronO commented 9 years ago

Fixed by #5