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

Better convert options for ePub output #107

Closed
anthonynelzinsantos opened this issue Aug 3, 2020 · 2 comments
Closed

Better convert options for ePub output #107

anthonynelzinsantos opened this issue Aug 3, 2020 · 2 comments
Labels
Status: PR Welcome Welcome to Pull Request Status: Proposal Request for comments

Comments

@anthonynelzinsantos
Copy link
Contributor

HonKit provides a wide array of convert options for the PDF output, but none for the ePub output. Worse, it hardcodes defaults values (cf. honkit/packages/honkit/src/output/ebook/getConvertOptions.js) that it probably shouldn't. As least, HonKit should add the following general settings:

  • book-producer: currently set to "HonKit", should be user-configurable
  • publisher: currently set to "HonKit", should absolutely be user-configurable

Some other missing or hardcoded values could be available as general settings or ePub specific options:

  • pubdate: to set the publication date of the book
  • series and series-index: to set the series the book belongs to, and the index of the book in this series
  • epub.toc.position: to set the position of the ToC at the end of the book instead of the start (see --epub-toc-at-end in ebook-convert options)
  • epub.toc.title: to set the title of the ToC, as in some languages, a ToC at the beginning of the book has a different name as a ToC at the end of the book (eg "Sommaire" and "Table des matières" in French)

This would go a long way in making the ePub output more robust (and, speaking as a publisher, more "store-ready").

  • HonKit version: 3.5.5
@azu azu added Status: PR Welcome Welcome to Pull Request Status: Proposal Request for comments labels Aug 3, 2020
@azu
Copy link
Member

azu commented Aug 3, 2020

Make sense.

Currently, HonKit does not define epub specific options.

It is good that we add epub specific option as epub.* options.

@anthonynelzinsantos
Copy link
Contributor Author

Opened a PR for the first part of my issue. I will work on the missing values and the ePub-specific options tomorrow.

azu pushed a commit that referenced this issue Aug 6, 2020
… options (#108)

* chore: ignore .DS_Store files

Necessary to work on macOS.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* feat(getConvertOptions): add producer and publisher roles

The book producer and publisher aren't harcoded anymore. Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* docs(config): add producer and publisher roles

Related to 9d02c08. Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* fix(fixtures): revert unwanted changes

No need to update the fixtures! Duh.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* feat(getConvertOptions): add pubdate

No if statement needed, although the code would probably be more robust with one, as ebook-convert ignores empty params. Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* feat(getConvertOptions): add series and series-index

Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* feat(getConvertOptions): add authorSort

Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>

* fix(docs): correct pubdate doc

Add hour to ensure ebook-convert will output the correct date. If no/erroneous date is provided, the compile time will be used. Addresses #107.

Signed-off-by: Anthony Nelzin-Santos <anthony@nelzin.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: PR Welcome Welcome to Pull Request Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants