# fn()
# this.fileSystemSearch()
# ...args(input, output, options, eleventyConfig)
Parameters
| Name | Types | Description |
|---|---|---|
| input | string |
- Directory or filename for input/sources files. |
| output | string |
- Directory serving as the target for writing the output files. |
| options | EleventyOptions |
|
| eleventyConfig | TemplateConfig |
# ConfigInitialized()
# configPath()
# directories()
# errorHandler()
# getVersion()
# input()
# inputDir()
# inputFile()
# logger()
# Map()
# outputDir()
# pathPrefix()
# setDryRun(isDryRun)
Updates the dry-run mode of Eleventy.
Parameters
| Name | Types | Description |
|---|---|---|
| isDryRun | boolean |
- Shall Eleventy run in dry mode? |
# setFormats(formats)
Updates the template formats of Eleventy.
Parameters
| Name | Types | Description |
|---|---|---|
| formats | string |
- The new template formats. |
# setIgnoreInitial(ignoreInitialBuild)
Set whether or not to do an initial build
Parameters
| Name | Types | Description |
|---|---|---|
| ignoreInitialBuild | boolean |
- Shall Eleventy ignore the default initial build before watching in watch/serve mode? |
# setIncrementalBuild(isIncremental)
Sets the incremental build mode.
Parameters
| Name | Types | Description |
|---|---|---|
| isIncremental | boolean |
- Shall Eleventy run in incremental build mode and only write the files that trigger watch updates |
# setIncrementalFile(incrementalFile)
Set the file that needs to be rendered/compiled/written for an incremental build. This method is also wired up to the CLI --incremental=incrementalFile
Parameters
| Name | Types | Description |
|---|---|---|
| incrementalFile | string |
- File path (added or modified in a project) |
# setIsVerbose(isVerbose)
Updates the verbose mode of Eleventy.
Parameters
| Name | Types | Description |
|---|---|---|
| isVerbose | boolean |
- Shall Eleventy run in verbose mode? |
# setPathPrefix(pathPrefix)
Updates the path prefix used in the config.
Parameters
| Name | Types | Description |
|---|---|---|
| pathPrefix | string |
- The new path prefix. |
# setRunMode(runMode)
Updates the run mode of Eleventy.
Parameters
| Name | Types | Description |
|---|---|---|
| runMode | string |
- One of "build", "watch", or "serve" |
# this.bench()
# this.buildCount()
# this.config()
# this.eleventyConfig()
# this.isDryRun()
# this.isIncremental()
# this.isRunInitialBuild()
# this.loader()
# this.options()
# this.programmaticApiIncrementalFile()
# this.rawInput()
# this.rawOutput()
# this.runMode()
# this.runMode()
# this.source()
# this.start()
# verboseMode()
# write(subtype)
Writes templates to the file system.
Parameters
| Name | Types | Description |
|---|---|---|
| subtype | String |
- (optional) or "templates" (skips passthrough copy) or "copy" (skips templates) |
# addFileToWatchQueue(changedFilePath, isResetConfig)
Parameters
| Name | Types | Description |
|---|---|---|
| changedFilePath | string |
- File that triggered a re-run (added or modified) |
| isResetConfig | boolean |
- are we doing a config reset |
# getHelp()
# serve(port)
Serve Eleventy on this port.
Parameters
| Name | Types | Description |
|---|---|---|
| port | Number |
- The HTTP port to serve Eleventy from. |
# setIncrementalBuild(isIncremental)
Sets the incremental build mode.
Parameters
| Name | Types | Description |
|---|---|---|
| isIncremental | boolean |
- Shall Eleventy run in incremental build mode and only write the files that trigger watch updates |
# this.eleventyServe()
# this.watchTargets()
# watcherBench()
# this.validTemplateLanguageKeys()
# needsToReadFileContents()
# needsToReadFileContents()
JavaScript files defer to the module loader rather than read the files to strings
# ...args()
# permalinkNeedsCompilation()
# tokens()
# etLibrary()
# permalinkNeedsCompilation()
# ...args()
# constructor(message, originalError)
Parameters
| Name | Types | Description |
|---|---|---|
| message | string |
- The error message to display. |
| originalError | unknown |
- The original error caught. |
# bus()
Provides a global event bus that modules deep down in the stack can subscribe to from a global singleton for decoupled pub/sub.
# debug()
# eOverride()
# eOverride()
# function()
# _renderFileShortcodeFn()
# _renderStringShortcodeFn()
# compile()
# ConfigInitialized()
# options.tagName()
# RenderPlugin(eleventyConfig, options)
A plugin to add shortcodes to render an Eleventy template string (or file) inside of another template. {@link https://v3.11ty.dev/docs/plugins/render/}
Parameters
| Name | Types | Description |
|---|---|---|
| eleventyConfig | module:11ty/eleventy/UserConfig |
- User-land configuration instance. |
| options | object |
- Plugin options |
# renderShortcodeFn()
# existsCache()
# getPathPrefix()
Gets the current path prefix denoting the root folder the output will be deployed to
# if()
# setPathPrefix(pathPrefix)
Overwrites the path prefix.
Parameters
| Name | Types | Description |
|---|---|---|
| pathPrefix | String |
- The new path prefix. |
# setProjectConfigPath(path)
Overwrites the config path.
Parameters
| Name | Types | Description |
|---|---|---|
| path | String |
- The new config path. |
# TemplateConfig(customRootConfig, projectConfigPath)
Config for a template.
Parameters
| Name | Types | Description |
|---|---|---|
| customRootConfig | {} |
- tbd. |
| projectConfigPath | String |
- Path to local project config. |
# this.customRootConfig()
# this.overrides()
# UserConfig()
# uses()
# usesGraph()
# _stripDateFromSlug()
Removes dates in the format of YYYY-MM-DD from a given slug string candidate.
# ...args()
# ...args()
# addPlugin(plugin)
addPlugin: async friendly in 3.0
Parameters
| Name | Types | Description |
|---|---|---|
| plugin | PluginDefinition |
# extensionOptions()
# sthroughCopy(fileOrDir, copyOptions)
Adds a path to a file or directory to the list of pass-through copies which are copied as-is to the output.
Parameters
| Name | Types | Description |
|---|---|---|
| fileOrDir | string |
object |
| copyOptions | object |
options for recursive-copy. see https://www.npmjs.com/package/recursive-copy#arguments default options are defined in TemplatePassthrough copyOptionsDefault |
# this.benchmarkManager()
# this.benchmarkManager.get()
# this.benchmarkManager.get()
# this.benchmarks()
# this.chokidarConfig()
# this.collections()
# this.dir()
# this.directories()
# this.directoryAssignments()
# this.errorReporting()
# this.errorReporting()
# this.events()
# this.extensionConflictMap()
# this.globalData()
# this.javascript()
# this.layoutAliases()
# this.libraryAmendments()
# this.libraryOverrides()
# this.linters()
# this.liquid()
# this.logger()
# this.nunjucks()
# this.passthroughCopies()
# this.pathPrefix()
# this.precompiledCollections()
# this.preprocessors()
# this.serverOptions()
# this.transforms()
# this.universal()
# this.virtualTemplates()
# ...args()
# ...args(type, args)
Parameters
| Name | Types | Description |
|---|---|---|
| type | string |
- The event name to emit. |
| args | ...* |
- Additional lazy-executed function arguments that get passed to listeners. |
# AsyncEventEmitter()
This class emits events asynchronously. Note that Eleventy has two separate event emitter instances it uses: 1. a userland one (UserConfig.js) 2. a global one for internals (EventBus.js)
# message(message, type, chalkColor, forceToConsole)
Formats the message to log.
Parameters
| Name | Types | Description |
|---|---|---|
| message | string |
- The raw message to log. |
| type | LogType |
- The error level to log. |
| chalkColor | string |
undefined |
| forceToConsole | boolean |
- Enforce a log on console instead of specified target. |
# this.callbacks()
# this.plugins()
# this.posthtmlProcessOptions()
# isUseAll()
# encoding()
# loadContents()
# function(config)
Default configuration object factory.
Parameters
| Name | Types | Description |
|---|---|---|
| config | config |
- Eleventy configuration object. |
# function(config)
Extended default configuration object factory.
Parameters
| Name | Types | Description |
|---|---|---|
| config | config |
- Eleventy configuration object. |