khnum 0.1.0 copy "khnum: ^0.1.0" to clipboard
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, @foreach with key => value and a loop variable, @for.
  • Layouts: @extends, @section, @yield with default, @parent, @show, inline sections.
  • @include with scope sharing and data override.
  • Anonymous components: attributes, :bound attributes, interpolated attributes, slot, named slots, @props, attributes bag with merge.
  • Extensibility: helper(), directive(), resolve<T>(), share(), custom TemplateLoader.
  • Errors carry template name and line; path traversal and recursion are rejected.
0
likes
150
points
44
downloads

Documentation

API reference

Publisher

verified publishergaitco.com

Weekly Downloads

Khnum HTML templates for pure Dart servers with layouts, includes, components, and safe escaping.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

path

More

Packages that depend on khnum