epub

object epub extends EPUBOps

Selects the configuration options available for EPUB generation.

trait EPUBOps
trait CopyOps
trait SingleConfigOps
trait ColorOps
trait CommonConfigOps
class Object
trait Matchable
class Any

Value members

Inherited methods

def autoLinkCSS(paths: Path*): Helium

Auto-links CSS documents from the specified paths. By default all CSS documents found anywhere in the input tree will be linked in HTML files. This setting allows to narrow it down to one or more dedicated paths within the virtual tree, which might be useful when your input contains CSS files unrelated to the pages rendered by Laika.

Auto-links CSS documents from the specified paths. By default all CSS documents found anywhere in the input tree will be linked in HTML files. This setting allows to narrow it down to one or more dedicated paths within the virtual tree, which might be useful when your input contains CSS files unrelated to the pages rendered by Laika.

For inclusion in EPUB document a special suffix is expected:

  • .shared.css for CSS documents to be auto-linked for EPUB and the website
  • .epub.css for CSS document to be auto-linked only for EPUB, but not the website
Inherited from
EPUBOps
def autoLinkJS(paths: Path*): Helium

Auto-links JavaScript documents from the specified paths. By default all JavaScript documents found anywhere in the input tree will be linked in HTML files. This setting allows to narrow it down to one or more dedicated paths within the virtual tree, which might be useful when your input contains JavaScript files unrelated to the pages rendered by Laika.

Auto-links JavaScript documents from the specified paths. By default all JavaScript documents found anywhere in the input tree will be linked in HTML files. This setting allows to narrow it down to one or more dedicated paths within the virtual tree, which might be useful when your input contains JavaScript files unrelated to the pages rendered by Laika.

Inherited from
EPUBOps
protected def copyWith(pdfSettings: PDFSettings): Helium
Inherited from
CopyOps
protected def copyWith(epubSettings: EPUBSettings): Helium
Inherited from
CopyOps
protected def copyWith(siteSettings: SiteSettings): Helium
Inherited from
CopyOps
def coverImages(images: CoverImage*): Helium

Specifies one or more cover images for the EPUB document.

Specifies one or more cover images for the EPUB document.

Multiple cover images are only relevant when the @:select directive is used to generate different versions of the same e-book which can all have their own cover image. See the documentation for the @:select directive in the chapter "Standard Directives" in the manual for details.

Inherited from
EPUBOps
protected def currentColors: ColorSet
Inherited from
EPUBOps
def darkMode: DarkModeOps

Allows to add a second color set for dark mode. The implementation is based on the prefers-color-scheme media query and requires e-book readers supporting dark mode.

Allows to add a second color set for dark mode. The implementation is based on the prefers-color-scheme media query and requires e-book readers supporting dark mode.

Inherited from
EPUBOps
def fontFamilies(body: String, headlines: String, code: String): Helium
Inherited from
SingleConfigOps
Inherited from
EPUBOps
def fontSizes(body: Length, code: Length, title: Length, header2: Length, header3: Length, header4: Length, small: Length): Helium
Inherited from
SingleConfigOps
def layout(defaultBlockSpacing: Length, defaultLineHeight: Double, keepTogetherDecoratedLines: Int): Helium

Allows to override the defaults for Helium's EPUB layout.

Allows to override the defaults for Helium's EPUB layout.

You can use the constructors found in the LengthUnit companion to create length values, e.g. LengthUnit.px(12). It's usually most convenient to import laika.ast.LengthUnit._ for your configuration code.

Most arguments should be self-explanatory. The keepTogetherDecoratedLines value controls the number of lines for decorated blocks like code examples or callouts that should always be kept on the same page. With a setting of 12 for example only blocks with more than 12 lines are allowed to be split across multiple pages. If you choose very high numbers for this setting you might see pages with a lot of blank space when it has to move a large block to the next page.

Inherited from
EPUBOps
def messageColors(info: Color, infoLight: Color, warning: Color, warningLight: Color, error: Color, errorLight: Color): Helium
Inherited from
ColorOps
def metadata(title: Option[String], description: Option[String], identifier: Option[String], authors: Seq[String], language: Option[String], date: Option[Instant], version: Option[String]): Helium
Inherited from
SingleConfigOps
Inherited from
ColorOps
def tableOfContent(title: String, depth: Int): Helium

Adds a dedicated page for a table of content, in addition to the left navigation bar.

Adds a dedicated page for a table of content, in addition to the left navigation bar.

Value Params
depth

the navigation depth which may be different than the one for the navigation bar

title

the title to display on the page and in navigation that links to the page

Inherited from
EPUBOps
def themeColors(primary: Color, primaryMedium: Color, primaryLight: Color, secondary: Color, text: Color, background: Color, bgGradient: (Color, Color)): Helium
Inherited from
ColorOps
protected def withColors(colors: ColorSet): Helium
Inherited from
EPUBOps
protected def withFontFamilies(fonts: ThemeFonts): Helium
Inherited from
EPUBOps
protected def withFontSizes(sizes: FontSizes): Helium
Inherited from
EPUBOps
protected def withMetadata(metadata: DocumentMetadata): Helium
Inherited from
EPUBOps