Skip to content
This repository was archived by the owner on Apr 25, 2020. It is now read-only.

unifire-app/pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 

Repository files navigation

layout homepage disable_anchors description
full
true
true
Aspect is a compiling template engine for Lua and LuaJIT.

Build Status codecov Luarocks

Aspect is a compiling templating engine for Lua and OpenResty.

The key-features are...

  • Well known: The most popular syntax is used - Twig compatible, Jinja/Liquid like.
  • Fast: Aspect compiles templates down to plain optimized Lua code. Moreover, Lua code compiles into bytecode - the fastest representation of a template.
  • Secure: Aspect has a sandbox mode to evaluate all template code. This allows Aspect to be used as a template language for applications where users may modify the template design.
  • Flexible: Aspect is powered by a flexible lexer and parser. This allows the developer to define their own custom tags, filters, functions and operators, and to create their own DSL.
  • Supports lua 5.1/5.2/5.3 and luajit 2.0/2.1 (with OpenResty)
  • Has console renderer.
  • No dependencies. Pure Lua.
  • List of all features

Synopsis

<!DOCTYPE html>
<html>
    <head>
        {% block head %}
            <title>{{ page.title }}</title>
        {% endblock %}
    </head>
    <body>
        {% block content %}
            <ul id="navigation">
            {% for item in navigation %}
                <li><a href="{{ item.href }}">
                    {{- item.caption|escape -}}
                </a></li>
            {% endfor %}
            </ul>
    
            <h1>My Webpage</h1>
            {{ page.body }}
        {% endblock %}
    </body>
</html>

Aspect also has a console tool for rendering data

$ aspect /path/to/data.json /path/to/template.tpl

API Documentation

Syntax

Tags

Filters

Functions

Tests

Extending

About

Testing github pages with Aspect's tags

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published