Skip to content

Commit

Permalink
Merge branch 'docs-default-config' of github.com:Ryuno-Ki/eleventy in…
Browse files Browse the repository at this point in the history
…to Ryuno-Ki-docs-default-config
  • Loading branch information
zachleat committed Nov 10, 2023
2 parents fe89523 + be6994c commit a45f48b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ import slugifyFilter from "./Filters/Slugify.js";
import getLocaleCollectionItem from "./Filters/GetLocaleCollectionItem.js";
import getCollectionItemIndex from "./Filters/GetCollectionItemIndex.js";

/**
* @module 11ty/eleventy/defaultConfig
*/

/**
* @callback addFilter - Register a global filter.
* @param {string} name - Register a template filter by this name.
* @param {function} callback - The filter logic.
*/

/**
* @typedef {Object} config
* @property {addFilter} addFilter - Register a new global filter.
*/

/**
* @typedef {Object} defaultConfig
* @property {Array<string>} templateFormats - An array of accepted template formats.
* @property {string} [pathPrefix='/'] - The directory under which all output files should be written to.
* @property {string} [markdownTemplateEngine='liquid'] - Template engine to process markdown files with.
* @property {string} [htmlTemplateEngine='liquid'] - Template engine to process html files with.
* @property {boolean} [dataTemplateEngine=false] - Changed in v1.0
* @property {string} [htmlOutputSuffix='-o']
* @property {string} [jsDataFileSuffix='.11tydata'] - File suffix for jsData files.
* @property {Object} keys
* @property {string} [keys.package='pkg']
* @property {string} [keys.layout='layout']
* @property {string} [keys.permalink='permalink']
* @property {string} [keys.permalinkRoot='permalinkBypassOutputDir']
* @property {string} [keys.engineOverride='templateEngineOverride']
* @property {string} [keys.computed='eleventyComputed']
* @property {Object} dir
* @property {string} [dir.input='.']
* @property {string} [dir.includes='_includes']
* @property {string} [dir.data='_data']
* @property {string} [dir.output='_site']
* @deprecated handlebarsHelpers
* @deprecated nunjucksFilters
*/

/**
* Default configuration object factory.
*
* @param {config} config - Eleventy configuration object.
* @returns {defaultConfig}
*/
export default function (config) {
let templateConfig = this;

Expand Down

0 comments on commit a45f48b

Please sign in to comment.