Skip to content

ThemeCore

module ThemeCore
AssemblyNacara.Theme.Core
Attributes[<RequireQualifiedAccess>]

Functions and values

configureBase (registry: Registry) : Registry

Register what every theme needs, documentation or not: the code-block renderer, the behaviours script, and the check that a page's social image exists.

Parameter
registryWhat the theme is contributing to.
contentStylesheet (registry: Registry) : Registry

Register the shared content stylesheet on its own, in the nacara.content layer, linked from every page by stylesheetLinks.

It reads the --nacara-* tokens, which the site defines or takes from tokensStylesheet.

Parameter
registryWhat the theme is contributing to.
defaultTokens (value: bool) (options: SiteOptions) : SiteOptions
defaults: SiteOptions
plugin () : IPlugin

A plugin for a site that writes its own layouts and stylesheet.

It registers what configureBase does, the default tokens and the content stylesheet.

pluginWith (configure: SiteOptions -> SiteOptions) : IPlugin
register (site: Site) : Site

Add plugin to a site.

Parameter
siteThe site being described.
registerWith (configure: SiteOptions -> SiteOptions) (site: Site) : Site
tokensStylesheet (registry: Registry) : Registry

Register the default tokens on their own, in the nacara.tokens layer, linked from every page before the site's stylesheet.

They set the tokens on :root, :root[data-theme="light"] and :root[data-theme="dark"]. A site overriding one writes it under the same selector.

Parameter
registryWhat the theme is contributing to.