site

object site extends SiteOps

Selects the configuration options available for site generation.

trait SiteOps
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.

Inherited from
SiteOps
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
SiteOps
def baseURL(url: String): Helium

Specifies the base URL where the rendered site will be hosted. This configuration option allows to turn internal links into external ones for documents which will be part of the rendered site, but are not included in other formats like EPUB or PDF.

Specifies the base URL where the rendered site will be hosted. This configuration option allows to turn internal links into external ones for documents which will be part of the rendered site, but are not included in other formats like EPUB or PDF.

Inherited from
SiteOps
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
protected def currentColors: ColorSet
Inherited from
SiteOps
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 browsers 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 browsers supporting dark mode.

Inherited from
SiteOps
def downloadPage(title: String, description: Option[String], downloadPath: Path, includeEPUB: Boolean, includePDF: Boolean): Helium

Adds a download page to the generated site that contains links to EPUB and PDF versions of the site. When the sbt plugin is used, this setting will automatically trigger the rendering of the corresponding EPUB and PDF documents when running laikaSite. When the library API is used, this setting only causes the inclusion of the download page itself, the actual EPUB and PDF content must be generated by running the respective renderers manually.

Adds a download page to the generated site that contains links to EPUB and PDF versions of the site. When the sbt plugin is used, this setting will automatically trigger the rendering of the corresponding EPUB and PDF documents when running laikaSite. When the library API is used, this setting only causes the inclusion of the download page itself, the actual EPUB and PDF content must be generated by running the respective renderers manually.

Value Params
description

a short description that appears on the download page right under the title

downloadPath

the virtual path the EPUB and PDF documents will be generated into

includeEPUB

whether EPUB documents will be automatically generated (only having an effect when using the sbt plugin)

includePDF

whether PDF documents will be automatically generated (only having an effect when using the sbt plugin)

title

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

Inherited from
SiteOps
def favIcons(icons: Favicon*): Helium

Adds one or more favicons which can be an internal resource or an external URL.

Adds one or more favicons which can be an internal resource or an external URL.

Inherited from
SiteOps
def fontFamilies(body: String, headlines: String, code: String): Helium
Inherited from
SingleConfigOps
Inherited from
SiteOps
def fontSizes(body: Length, code: Length, title: Length, header2: Length, header3: Length, header4: Length, small: Length): Helium
Inherited from
SingleConfigOps
def landingPage(logo: Option[Image], title: Option[String], subtitle: Option[String], latestReleases: Seq[ReleaseInfo], license: Option[String], documentationLinks: Seq[TextLink], projectLinks: Seq[ThemeLink], teasers: Seq[Teaser]): Helium

Adds a dedicated landing page to the site that is tailored for software documentation sites. By default no landing page will be included and the site will render the homepage (if present) with the same default template as the main content pages.

Adds a dedicated landing page to the site that is tailored for software documentation sites. By default no landing page will be included and the site will render the homepage (if present) with the same default template as the main content pages.

See the section "Website Landing Page" in the "Theme Settings" chapter for visual guide to the layout of the page.

All arguments of this method are optional, but the page would look strange if you omit most of them.

Additionally or alternatively you can also add a regular markup document called landing-page.<suffix> to one of your input directories and its content will be inserted at the bottom of this page. This is in case you want to stick with the traditional approach of some sites, which give you 'Getting Started' style content right on the start page. It can also be used to list adopters, provide a feature overview or links to presentations or videos.

Value Params
documentationLinks

a set of documentation links to render in a dedicated panel on the right side of the header

latestReleases

a set of release versions to display on the right side of the header

license

the license info to render right under the release info

logo

a logo to be placed on the left hand side of the header

projectLinks

a set of project links to render at the bottom of the right side of the header

subtitle

a subtitle to be place right under the title

teasers

a set of teasers containing of headline and description to render below the header

title

a title to be placed right under the logo

Inherited from
SiteOps
def layout(contentWidth: Length, navigationWidth: Length, topBarHeight: Length, defaultBlockSpacing: Length, defaultLineHeight: Double, anchorPlacement: AnchorPlacement): Helium

Allows to override the defaults for Helium's 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.

Allows to override the defaults for Helium's 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.

Value Params
anchorPlacement

the placement of anchors for copying the links of section headlines (left, right or none)

contentWidth

the maximum width of the main content column

defaultBlockSpacing

the default space between block elements

defaultLineHeight

the default line height

navigationWidth

the width of the left navigation sidebar

topBarHeight

the height of the top navigation bar

Inherited from
SiteOps
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
SiteOps
def themeColors(primary: Color, primaryMedium: Color, primaryLight: Color, secondary: Color, text: Color, background: Color, bgGradient: (Color, Color)): Helium
Inherited from
ColorOps
def topNavigationBar(homeLink: ThemeLink, navLinks: Seq[ThemeLink], highContrast: Boolean): Helium

Configures the top navigation bar of the main content pages.

Configures the top navigation bar of the main content pages.

Value Params
highContrast

indicates whether the background color should have a high contrast to the background of the page (darker in light mode and lighter in dark mode).

homeLink

the link to the homepage, by default pointing to index.html and using the Helium home icon.

navLinks

an optional set of links to be placed at the right side of the bar, supported link types are IconLink, ButtonLink, ImageLink and a plain TextLink

Inherited from
SiteOps
def versions(versions: Versions, dropDownPrefix: String): Helium

Adds a version dropdown to the top navigation bar.

Adds a version dropdown to the top navigation bar.

The specified configuration allows to define the current version as well as any older or newer versions. For each version the pathSegment property holds the value that should use as part of URLs (e.g. /0.18/...) whereas the displayValue property holds the text that should be shown in the dropdown menu.

If the output destination of the render operation contains existing, older versions in sub-folders, those will be scanned to produce additional version information in the JSON loaded by the site. This will be used for "smart linking" where the drop-down will link to the same page of a different version if it exists.

Inherited from
SiteOps
protected def withColors(colors: ColorSet): Helium
Inherited from
SiteOps
protected def withFontFamilies(fonts: ThemeFonts): Helium
Inherited from
SiteOps
protected def withFontSizes(sizes: FontSizes): Helium
Inherited from
SiteOps
protected def withMetadata(metadata: DocumentMetadata): Helium
Inherited from
SiteOps