Methods
(async, static) addItem(optionsopt)
Add an item to the container
| Name | Type | Attributes | Default | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for adding an item Properties
|
- Source
(static) alert(text, message, optsopt) → {string}
Print warning message in page
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
text | string | |||
message | string | |||
opts | Object | <optional> | {} |
- Source
- Type:
- string
(async, static) applyConcatRsc(options) → {Promise.<void>}
Apply concatenation of resources (CSS, JS) based on configuration and cache results
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
- Type:
- Promise.<void>
(static) applyInclude($) → {string}
Apply include directive in the page
| Name | Type | Description |
|---|---|---|
$ | Object | Cheerio instance |
- Source
- Type:
- string
(async, static) attrsMutation(options)
Mutate attributes of an element and its children
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
(async, static) buildPage(options) → {Promise.<string>}
Build the final HTML page by processing the template, applying themes, iconsets, and manipulating the DOM as needed
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
- Type:
- Promise.<string>
(async, static) buildTheme(mod, fw)
Build a theme
| Name | Type | Description |
|---|---|---|
mod | Object | Module object |
fw | Object | Framework object |
- Source
(async, static) collectInline(type, optionsopt) → {Promise.<Array>}
Collect inline resources (css, scripts) from theme/iconset and options
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
type | string | Type of resource ('inlineCss', 'inlineScript') | ||
options | Object | <optional> | {} | Additional options for resource collection |
- Source
- Array of collected inline resources
- Type:
- Promise.<Array>
(async, static) collectRegular(type, transformer, optionsopt) → {Promise.<Array>}
Collect regular resources (css, scripts, links) from theme/iconset, frontmatter, and options
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
type | string | Type of resource ('css', 'scripts', 'links') | ||
transformer | function | Function to transform each resource item | ||
options | Object | <optional> | {} | Additional options for resource collection |
- Source
- Array of collected and transformed resource items
- Type:
- Promise.<Array>
(async, static) concatResources(options) → {Promise.<void>}
Concatenate resources (CSS, JS) based on configuration and cache results
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
- Type:
- Promise.<void>
(async, static) exports.collectIconsets() → {Promise.<void>}
Collect iconsets
- Source
- Type:
- Promise.<void>
(async, static) exports.collectThemes() → {Promise.<void>}
Collect themes
- Source
- Type:
- Promise.<void>
(async, static) exports.collectViewEngines() → {Promise.<void>}
Collect view engines
- Source
- Type:
- Promise.<void>
(async, static) exports.injectElements(optionsopt)
Inject elements into the page
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for element injection Properties
|
- Source
(static) exports.printLink(link) → {string}
Print a link element
| Name | Type | Description |
|---|---|---|
link | Object | Link object |
- Source
- HTML string for the link element
- Type:
- string
(static) exports.printScript(script) → {string}
Print a script element
| Name | Type | Description |
|---|---|---|
script | Object | Script object |
- Source
- HTML string for the script element
- Type:
- string
(async, static) injectCss(optionsopt)
Inject CSS into the page
| Name | Type | Attributes | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for CSS injection Properties
|
- Source
(async, static) injectLink(optionsopt)
Inject link elements into the page
| Name | Type | Attributes | Default | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for link injection Properties
|
- Source
(async, static) injectMeta(optionsopt)
Inject meta tags into the page
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for meta injection Properties
|
- Source
(async, static) injectScript(optionsopt)
Inject scripts into the page
| Name | Type | Attributes | Default | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for script injection Properties
|
- Source
(async, static) loadItems(type, theme)
Load items into the theme
| Name | Type | Description |
|---|---|---|
type | string | Type of items to load |
theme | Object | Theme object to load items into |
- Source
(async, static) manipulation(options)
Manipulate the DOM based on specific attributes and move elements as needed
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
(async, static) parseAttr(options)
Parse attributes of an element and apply transformations
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
(async, static) replace(options) → {Promise.<void>}
Replace unknown component tag with div or comment
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
- Type:
- Promise.<void>
(async, static) replaceTag(options) → {Promise.<void>}
Replace unknown component tag with div or comment
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Properties
|
- Source
- Type:
- Promise.<void>