Skip to content

Jinya HTML is a tagged template string based super simple template engine, which probably doesn't even deserve the name template engine.

License

Notifications You must be signed in to change notification settings

Jinya-CMS/jinya-html

Repository files navigation

permalink layout
index.html
default

Jinya HTML

Jinya HTML is a tagged template string based super simple template engine, which probably doesn't even deserve the name template engine.

Installation

Either copy the index.js file or use the @jinyacms/jinya-html package from NPM.

Usage

Jinya HTML is ESM based, so you just need to include the index.js file. See a simple example below:

import { html } from 'jinya-html';

document.addEventListener('DOMContentLoaded', () => {
	const username = 'Foobar';
	const result = html` <h1>${username}</h1>
		<ul>
			${['one', 'two', 'three'].map((item) => `<li>${item}</li>`)}
		</ul>
		<div>${() => 'Test'}</div>`;
	document.body.innerHTML = result;
});

License

Jinya HTML is licensed under the MIT License.

About

Jinya HTML is a tagged template string based super simple template engine, which probably doesn't even deserve the name template engine.

Resources

License

Stars

Watchers

Forks

Packages

No packages published