The Equal Justice Initiative
Eleventy
The possum is Eleventy’s mascot
Eleventy Documentation
Menu
Eleventy 5.81s
Nuxt 14.77s

HTML

Template Languages:

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 Jump to heading

WARNING:
This is a Common Pitfall.

Careful 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.

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

$ eleventy --input=. --output=. --formats=md,html
Writing ./README/index.html from ./README.md
Writing ./README/index-o.html from ./README/index.html

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

Moreover, you may notice in the above output that the second template wrote to index-o.html. When the input and output directories are the same and the source template is named index.html, we add an -o suffix to avoid overwriting itself. This is a special case that only applies to index.html filenames. You can customize the -o suffix with the htmlOutputSuffix configuration option.


Other pages in Template Languages:


Related Docs