Editions
Editions represents both different formats of the file and the ability to create different variants of the publication, such as making an Amazon-specific or a PDF version of a publication. Each edition is described as a key underneath the top-level editions element:
editions:
epub:
format: "@mfgames-writing/epub2-format"
outputDirectory: .
outputFilename: "name-of-book-0.1.1.epub"
pdf:
format: "@mfgames-writing/weasyprint-format"
outputDirectory: .
outputFilename: "name-of-book-0.1.1.epub"
Variables
Many of the fields provide for the ability to subsitute variables using a Liquid template. The variables inside the package.json file in the same directory is automatically included, prefixed by edition..
Metadata
The metadata elements are automatically pulled into each addition, which overrides the metadata.
metadata:
language: en
author: Name of author
title: Title of the Book
theme: "@mfgames-writing/clean-theme"
outputDirectory: .
# Name of the file. In this case, `edition.name` and `edition.version` come
# from the `package.json` file and `edition.ext` comes from the individual
# editions.
outputFilename: "{{ edition.name }}-{{ edition.version }}.{{ edition.ext }}"
editions:
epub:
format: "@mfgames-writing/epub2-format"
ext: epub
pdf:
format: "@mfgames-writing/weasyprint-format"
ext: pdf
Formatting
style
The style element allow overriding style for an edition (or all editions by putting it under the metadata element).
metadata:
style:
css: >
em { color: green; }
p { color: red; }
editions:
epub:
# Will have red paragraphs and green emphasis.
format: "@mfgames-writing/epub2-format"
ext: epub
pdf:
# Will have blue paragraphs and normal emphasis.
format: "@mfgames-writing/weasyprint-format"
ext: pdf
style:
css: >
p { color: blue; }
Metadata
Project
- Project Home
- Documentation
- Repository
- Issues
- Project ID: 01947839-fc77-7f19-8d03-e576f477e15c