Link Search Menu Expand Document




npx eleventy --formats=md


Create Configuration

module.exports = function(eleventyConfig) {
  return {
    dir: {
      input: "./",      // Equivalent to Jekyll's source property
      output: "./_site" // Equivalent to Jekyll's destination property
  • Whereas Jekyll allows you to list folders and files to ignore under its exclude property, Eleventy looks for these values inside a file called .eleventyignore (in addition to .gitignore).
  • By default, Eleventy uses markdown-it to parse Markdown. If your content uses advanced syntax features (such as abbreviations, definition lists and footnotes), you’ll need to pass Eleventy an instance of this (or another) Markdown library configured with the relevant options and plugins.


  • must reside within the _includes directory (


Site variables

  • add our site-wide values to a JSON file inside a folder called _data and name this file site.json, we can keep the site.* namespace and leave our variables unchanged.
  "title": "Markdown Guide",
  "url": "",
  "baseurl": "",
  "repo": "",
  "comments": false,
  "author": {
    "name": "Matt Cone"
  "og_locale": "en_US"

Page variables

The table below shows a mapping of common page variables. As a rule, frontmatter properties are accessed directly, whereas derived metadata values (things like URLs, dates etc.) get prefixed with the page.* namespace:

page.url	page.url
page.path	page.inputPath	page.outputPath	page.fileSlug
page.content	content
page.title	title
page.foobar	foobar

When iterating through pages, frontmatter values are available via the data object while content is available via templateContent:

Jekyll	Eleventy
item.url	item.url
item.path	item.inputPath	item.fileSlug	item.outputPath
item.content	item.templateContent


If you’re not passing variables to your includes, everything should work without modification. Otherwise, note that whereas with Jekyll you would do this:


Using directory data to manage defaults


  • no support for asset compilation or bundling scripts


  1. Cli
  2. Config
  3. Dev
  4. Faq
  5. Gotchas
  6. Internal
  7. Issues
  8. Plugin
  9. Plugins
  10. Qa
  11. Quickstart
  12. Ref
  13. T