site

laika.helium.Helium.site$
object site

Selects the configuration options available for site generation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
site.type

Members list

Value members

Inherited methods

Adds one or more font resources to the theme, either based on a local classpath or file system resource, or a web font URL, or both.

Adds one or more font resources to the theme, either based on a local classpath or file system resource, or a web font URL, or both.

E-book formats like EPUB or PDF require a local font file to be available for embedding. A web font URL can only be used for website generation.

When using this method, all default fonts of the Helium theme will be de-registered.

Attributes

Inherited from:
CommonConfigOps (hidden)
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.

Attributes

Inherited from:
SiteOps (hidden)
protected def copyWith(pdfSettings: PDFSettings): Helium

Attributes

Inherited from:
CopyOps (hidden)
protected def copyWith(epubSettings: EPUBSettings): Helium

Attributes

Inherited from:
CopyOps (hidden)
protected def copyWith(siteSettings: SiteSettings): Helium

Attributes

Inherited from:
CopyOps (hidden)
protected def currentColors: ColorSet

Attributes

Inherited from:
SiteOps (hidden)
protected def currentContent: WebContent

Attributes

Inherited from:
SiteOps (hidden)
protected def currentLayout: WebLayout

Attributes

Inherited from:
SiteOps (hidden)
protected def currentMetadata: DocumentMetadata

Attributes

Inherited from:
SiteOps (hidden)
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.

Attributes

Inherited from:
SiteOps (hidden)
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 parameters

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

Attributes

Inherited from:
SiteOps (hidden)
def externalCSS(url: String, attributes: StyleAttributes, condition: Document => Boolean): Helium

Links an external CSS resource from the specified URL.

Links an external CSS resource from the specified URL.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
def externalJS(url: String, attributes: ScriptAttributes, condition: Document => Boolean): Helium

Links an external JavaScript resource from the specified URL.

Links an external JavaScript resource from the specified URL.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
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.

Attributes

Inherited from:
SiteOps (hidden)
def fontFamilies(body: String, headlines: String, code: String): Helium

Specifies which font family to use for the body text, for headlines and for inline code and code blocks.

Specifies which font family to use for the body text, for headlines and for inline code and code blocks.

All specified fonts need to be made available for the theme first by using the fontResources method. The body font needs to be available at least as regular, italic, bold and bold italic. The headline font needs to support bold and bold italic. For the code font a regular font weight is sufficient.

Attributes

Inherited from:
SingleConfigOps (hidden)

Attributes

Inherited from:
SiteOps (hidden)
def fontSizes(body: Length, code: Length, title: Length, header2: Length, header3: Length, header4: Length, small: Length): Helium

Configure the theme's font sizes. Most property names are self-explanatory, the small font is currently only used for footnote references in PDF output.

Configure the theme's font sizes. Most property names are self-explanatory, the small font is currently only used for footnote references in PDF output.

Attributes

Inherited from:
SingleConfigOps (hidden)
def inlineCSS(content: String, condition: Document => Boolean): Helium

Inserts inline style declarations into the HTML head.

Inserts inline style declarations into the HTML head.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
def inlineJS(content: String, isModule: Boolean, condition: Document => Boolean): Helium

Inserts inline scripts into the HTML head.

Inserts inline scripts into the HTML head.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
def internalCSS(searchPath: Path, attributes: StyleAttributes, condition: Document => Boolean): Helium

Auto-links CSS documents from the specified path, which may point to a single CSS document or a directory. In case of a directory it will be searched recursively and all CSS files found within it will be linked in the HTML head.

Auto-links CSS documents from the specified path, which may point to a single CSS document or a directory. In case of a directory it will be searched recursively and all CSS files found within it will be linked in the HTML head.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
def internalJS(searchPath: Path, attributes: ScriptAttributes, condition: Document => Boolean): Helium

Auto-links JavaScript documents from the specified path, which may point to a single JS document or a directory. In case of a directory it will be searched recursively and all *.js files found within it will be linked in the HTML head.

Auto-links JavaScript documents from the specified path, which may point to a single JS document or a directory. In case of a directory it will be searched recursively and all *.js files found within it will be linked in the HTML head.

The condition attribute can be used to only include the CSS when some user-defined predicates are satisfied.

Attributes

Inherited from:
SiteOps (hidden)
def landingPage(logo: Option[Image], title: Option[String], subtitle: Option[String], latestReleases: Seq[ReleaseInfo], license: Option[String], titleLinks: Seq[ThemeLink], documentationLinks: Seq[TextLink], projectLinks: Seq[ThemeLinkSpan], teasers: Seq[Teaser], styles: Seq[Path]): 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 parameters

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

styles

internal paths to additional CSS files that should be linked to the landing page

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

titleLinks

a row of links to render beneath the subtitle on the left side of the header

Attributes

Inherited from:
SiteOps (hidden)
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 parameters

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

Attributes

Inherited from:
SiteOps (hidden)
def messageColors(info: Color, infoLight: Color, warning: Color, warningLight: Color, error: Color, errorLight: Color): Helium

Attributes

Inherited from:
ColorOps (hidden)
def metadata(title: Option[String], description: Option[String], identifier: Option[String], authors: Seq[String], language: Option[String], datePublished: Option[OffsetDateTime], dateModified: Option[OffsetDateTime], version: Option[String]): Helium

Allows to define a small set of metadata that describes the output.

Allows to define a small set of metadata that describes the output.

In the generated site it will be used to populate the <head> section of the HTML output, for EPUB and PDF it will be used to embed the information into the generated files in a way that the respective readers understand.

When using the sbt plugin the title, description and version metadata will be pre-populated by the standard sbt settings name, description and version respectively. When using the library API no medata will be defined by default. It is recommended to always define the language and title as the minimum set of metadata.

Value parameters

authors

one or more author names

dateModified

the modification date as a UTC date-time

datePublished

the publication date as a UTC date-time

description

a short description of the site and/or e-book

identifier

a unique identifier for the e-book, not used for site generation

language

the language of the site and/or e-book, should always be defined

title

the title of the site and/or e-book

version

the version string for the output

Attributes

Inherited from:
SingleConfigOps (hidden)
def resetDefaults(mainNavigation: Boolean, topNavigation: Boolean, favIcons: Boolean): Helium

Resets the specified UI elements receiving a true flag to the defaults.

Resets the specified UI elements receiving a true flag to the defaults.

This method can be used in rare cases where a configuration that has been pre-populated with some UI elements beyond the built-in defaults of Helium should get reset without falling back to the basic Helium.defaults. This cannot be done with the regular configuration methods as some properties of type Seq[A] behave in an additive way, meaning that if you call .site.topNavigationBar(navLinks = Seq(...)) those links will be added to those already present.

If starting from Helium.defaults directly this method has no effect as Laika does not pre-populate those Seq[A] settings. But 3-rd party tools might provide a Helium instance with additional elements.

Value parameters

favIcons

indicates that the list of favicons should be cleared

mainNavigation

indicates whether the main (left) navigation pane should reset to the auto-generated list

topNavigation

indicates whether the top navigation bar should remove any pre-populated links

Attributes

Inherited from:
SiteOps (hidden)

Attributes

Inherited from:
ColorOps (hidden)
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 parameters

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

Attributes

Inherited from:
SiteOps (hidden)
def themeColors(primary: Color, primaryMedium: Color, primaryLight: Color, secondary: Color, text: Color, background: Color, bgGradient: (Color, Color)): Helium

Attributes

Inherited from:
ColorOps (hidden)
def topNavigationBar(homeLink: ThemeLink, navLinks: Seq[ThemeLink], versionMenu: VersionMenu, highContrast: Boolean): Helium

Configures the top navigation bar of the main content pages.

Configures the top navigation bar of the main content pages.

Value parameters

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

versionMenu

defines labels and optionally additional links for the version switcher menu

Attributes

Inherited from:
SiteOps (hidden)
def versions(versions: Versions): Helium

Specify the configuration for versioned documentation, a core Laika feature simply exposed via the Helium Config API.

Specify the configuration for versioned documentation, a core Laika feature simply exposed via the Helium Config API.

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.

The corresponding version switcher component of the theme can be configured with topNavigationBar.versionMenu. That setting allows to specify the labels and optionally additional link entries for the menu. Additional version switcher components can be added using the VersionMenu class, for example for adding the menu to the landing page where it is not included by default.

Attributes

Inherited from:
SiteOps (hidden)
protected def withColors(colors: ColorSet): Helium

Attributes

Inherited from:
SiteOps (hidden)
protected def withFontFamilies(fonts: ThemeFonts): Helium

Attributes

Inherited from:
SiteOps (hidden)
protected def withFontSizes(sizes: FontSizes): Helium

Attributes

Inherited from:
SiteOps (hidden)
protected def withMetadata(metadata: DocumentMetadata): Helium

Attributes

Inherited from:
SiteOps (hidden)

Deprecated and Inherited methods

def autoLinkCSS(paths: Path*): Helium

Attributes

Deprecated
true
Inherited from:
SiteOps (hidden)
def autoLinkJS(paths: Path*): Helium

Attributes

Deprecated
true
Inherited from:
SiteOps (hidden)