Use the template engine Eta to build pages.
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(); site.use(eta()); export default site;
See all available options in Deno Doc.
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! --- <html> <head> <title><%= title %></title> </head> <body> <%~ await includeFile("partials/nav.eta") %> <p><%= title %></p> </body> </html>
Note that the paths passed to
includeFile() function are always relative to
Creating pages is the same as creating layouts, just place the
.eta file outside the