| Crates.io | suika_templates |
| lib.rs | suika_templates |
| version | 0.1.6 |
| created_at | 2025-01-01 21:33:59.866715+00 |
| updated_at | 2025-06-15 22:32:29.169637+00 |
| description | A simple template engine for the suika web stack |
| homepage | |
| repository | https://github.com/JonWatkins/suika/tree/master/crates/suika_templates |
| max_upload_size | |
| id | 1501094 |
| size | 87,277 |
Important: This is a personal toy project, developed as an experiment and learning exercise.
As a toy project, its future development is uncertain. It may or may not receive future updates, maintenance, or bug fixes. Please do not use it in production environments.
Suika Templates is a simple template engine designed for the Suika web stack (also a toy project). It enables dynamic HTML generation with support for features like filters, inheritance, macros, and HTML minification.
The API is subject to change. This project is primarily for understanding template engine concepts and is not thoroughly tested or hardened for real-world applications.
The suika_templates library supports the following syntax:
<%# This is a comment %> (not rendered in output)<%= variable_name %> or <%= user.name %><%= name|upper %> or <%= items|length %>Conditionals:
<% if condition %> ... <% elif condition %> ... <% else %> ... <% endif %><% if user is defined %> ... <% endif %><% if array is empty %> ... <% endif %><% if item is "value" %> ... <% endif %><% if num is odd %> ... <% endif %><% if num is even %> ... <% endif %>Loops:
<% for item in items %> ... <% endfor %>loop.index: Zero-based iteration counterloop.index1: One-based iteration counter