Skip to navigation Skip to main content
These docs are for an upcoming version of Build Awesome and are subject to change—take extra care before linking here as URLs may change! Look to the latest stable docs instead (or the full release history).

HTML

Eleventy Short Name File Extension npm Package
html .html N/A

HTML files are pre-processed by default as Liquid templates. This is an optional feature and can be changed to a different template engine of your choice or disabled entirely. Furthermore, it can be configured on a per-template basis or globally. Read more at Changing a Template’s Rendering Engine.

Using the Same Input and Output Directories

This is a Common Pitfall.

Take care with the HTML template type when using the same --input and --output directory (this is not the default).

If you run Eleventy more than once, it’ll try to process your output files too which may result in duplicate template errors.

$ npx @11ty/eleventy --input=. --output=. --formats=md,html
Writing ./README/index.html from ./README.md

$ npx @11ty/eleventy --input=. --output=. --formats=md,html

The second run will attempt to write ./README/index.html from both ./README.md and ./README/index.html, resulting in a Duplicate Permalink Error (two templates writing to the same location). You can workaround this issue using the Ignores feature.

If you’re going to use --formats=html, it’s probably best not using the same input and output directories.