khnum 0.1.0
khnum: ^0.1.0 copied to clipboard
Khnum HTML templates for pure Dart servers with layouts, includes, components, and safe escaping.
0.1.0 #
Initial release.
- File-based templates with nested directories, development reload on file change, in-memory cache in production.
{{ }}escaped output,{!! !!}raw output,HtmlString,json()helper safe for<script>.- Restricted expression language: literals, member and index access, arithmetic, comparison, logic,
??,?:, helper calls. @if/@elseif/@else,@unless,@foreachwithkey => valueand aloopvariable,@for.- Layouts:
@extends,@section,@yieldwith default,@parent,@show, inline sections. @includewith scope sharing and data override.- Anonymous components: attributes,
:boundattributes, interpolated attributes,slot, named slots,@props,attributesbag withmerge. - Extensibility:
helper(),directive(),resolve<T>(),share(), customTemplateLoader. - Errors carry template name and line; path traversal and recursion are rejected.