Skip to content
The comprehensive template engine for NodeJs
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.editorconfig
.gitignore
LICENSE
README.md
package.json

README.md

Tundra title

The comprehensive template engine for Nodejs.

Tundra is a small, fast and customizable template engine for Nodejs. It perfectly integrates with any back-end framework or technology.

Features

  • Easy to learn and with a small codebase.

  • Cache system for speeding up the loading of views.

  • Standard library with useful functions.

  • Customizable syntax.

  • Inheritance capabilities.

  • And more...

Code snippets

{{ print_variable }}

{! print_variable_without_escaping_it !}

{# comment #}

{% var code_inside_this_tags = true %}

~{{ escape_template_tags }}

@require(imported_view.html)

@extends(parent_view.html)

{[ block name ]}
    {[ parent block_name ]}
{[ endblock ]}

Example

Rendering a simple view

main.js:

var http = require('http');
var Tundra = require('tundrajs');
var view = new Tundra();

http.createServer((req, res) => {
    var data = {
        title: 'Tundra',
        msg: 'Hello World!'
    };

    view.render(res, 'home.html', data);
    res.end();
}).listen(8080);

home.html:

<!DOCTYPE html>
    <head>
        <title>{{ title }}</title>
    </head>
    <body>
        {{ msg }}
    </body>
</html>

Contributing

Any contribution or support to this project in the form of a pull request or message will be highly appreciated.

Don't be shy :)

License

Tundra is open-source software licensed under the MIT license.

You can’t perform that action at this time.