Class: TemplateConfig

11ty/eleventy/TemplateConfig~ TemplateConfig

Config for a template.


new TemplateConfig(customRootConfig, projectConfigPath)

Parameters:
Name Type Description
customRootConfig Object

tbd.

projectConfigPath String

Path to local project config.

Members


<nullable> customRootConfig :Object

Custom root config.

Type:
  • Object

overrides :module:11ty/eleventy/TemplateConfig~TemplateConfig~override

tbd.

Type:

projectConfigPath :String

Path to local project config.

Type:
  • String
Default Value:
  • .eleventy.js

Methods


getConfig()

Returns the config object.

Returns:
  • The config object.
Type
Object

getLocalProjectConfigFile()

Normalises local project config file path.

Returns:
  • The normalised local project config file path.
Type
String

initializeRootConfig()

Bootstraps the config object.


mergeConfig(projectConfigPath)

Merges different config files together.

Parameters:
Name Type Description
projectConfigPath String

Path to project config.

Returns:

merged - The merged config file.

Type
Object

reset()

Resets the configuration.


resetOnWatch()

Resets the configuration while in watch mode.

To Do:
  • Add implementation.

setPathPrefix(pathPrefix)

Overwrites the path prefix.

Parameters:
Name Type Description
pathPrefix String

The new path prefix.


setProjectConfigPath(path)

Overwrites the config path.

Parameters:
Name Type Description
path String

The new config path.

Type Definitions


config

Config as used by the template.

Type:
  • Object
Properties:
Name Type Argument Description
pathPrefix String <optional>

The path prefix.


override

Object holding override information for the template config.

Type:
  • Object
Properties:
Name Type Argument Description
pathPrefix String <optional>

The path prefix.