Use the template engine Eta to build pages.


Eta is a JavaScript template engine with a syntax very similar to EJS but with some differences. This plugin allows using this template engine to create pages and layouts.


Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import eta from "lume/plugins/eta.ts";

const site = lume();


export default site;

See all available options in Deno Doc.

Creating layouts

Add a file with .eta extension in the _includes directory. Use the layout page variable to specify this layout.

title: Welcome to my page
intro: This is my first post using lume, I hope you like it!

    <title><%= title %></title>

    <%~ await includeFile("partials/nav.eta") %>

    <p><%= title %></p>

Note that the paths passed to includeFile() function are always relative to _includes directory.

Creating pages

Creating pages is the same as creating layouts, just place the .eta file outside the _includes directory.