Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added handlebars templating #8

Merged
merged 2 commits into from
Feb 21, 2020
Merged

Added handlebars templating #8

merged 2 commits into from
Feb 21, 2020

Conversation

Michael-F-Bryan
Copy link
Owner

This is an alternative to #5 and fixes #3 (hopefully).

I've added a simple handlebars template with the user being able to override the actual index template that is used. At the moment we just pass in the title and body (rendered HTML)
for a chapter, although this can easily be expanded in the future.

One concern I have is the CSS link to the stylesheet will be broken for nested chapters. Some time in the future we'll probably want to look at passing in the stylesheet's location as part of the template context.

epubcheck now passes without any errors 🎉

@gtsiam
Copy link

gtsiam commented Feb 5, 2020

Is there a reason this was left unmerged?
I'm not trying to push you, just asking;

I was originally looking to write my own pr for #3. (Though it would just add the missing <html></html> tags.)

@Michael-F-Bryan
Copy link
Owner Author

I think this wasn't merged because it's not really complete. I'm not sure if it even generated a valid EPUB file.

@gtsiam if you'd like to take over this PR or write your own I'm happy to mentor and review, however at the moment my energies are focused elsewhere so I won't be writing code.

@gambhiro
Copy link
Contributor

I would like to finish this feature if I may, I'd like to use it in a project.

I checked out the templates branch and made small changes to build it successfully, and fixed some epubcheck errors.

I opened PR #26, to merge to the templates branch here. Is this the way to do this?

As a separate issue after this, I would like to also add an option to specify a cover image and fix some warnings from Amazon's kindlegen tool.

@gambhiro gambhiro mentioned this pull request Feb 19, 2020
@Michael-F-Bryan Michael-F-Bryan merged commit bed53fe into master Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Epub result not readable on a Sony PRS-T3.
3 participants