Skip to main content
Module

x/handlebars/example/README.md

Handlebars template engine for Deno
Latest
File

Simple example with default options

import { Handlebars } from "https://deno.land/x/handlebars/mod.ts";

const handle = new Handlebars();

const text = await handle.renderView("index", { name: "Alosaur" });

console.log(text);

Just run this script

deno run --allow-read mod.ts

Returns:

header!
This is index page My name is Alosaur
<span>index page!</span>
This is
title!

----
<span>footer!</span>