All Projects → leven-the-blog → tenjin

leven-the-blog / tenjin

Licence: other
📝 A template engine.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to tenjin

Flexml
🚀基于Litho的Android高性能动态业务容器。
Stars: ✭ 225 (+1400%)
Mutual labels:  template-engine, dynamic
react-nes
React components for nes
Stars: ✭ 32 (+113.33%)
Mutual labels:  declarative
dynamic-queue
The dynamic queue
Stars: ✭ 17 (+13.33%)
Mutual labels:  dynamic
bs-dynamic-import
📦🚀 BuckleScript dynamic import interop on JavaScript environment
Stars: ✭ 31 (+106.67%)
Mutual labels:  dynamic
Pointy
A jQuery plugin that dynamically points one element at another ~
Stars: ✭ 25 (+66.67%)
Mutual labels:  dynamic
mobius-gui
🎨 Reactive & Stream & Driver based UI framework build on Mobius Utils, equipped with neumorphism-derived & utility-first styles.
Stars: ✭ 43 (+186.67%)
Mutual labels:  declarative
pianola
A declarative function composition and evaluation engine.
Stars: ✭ 18 (+20%)
Mutual labels:  declarative
opentbs
With OpenTBS you can merge OpenOffice - LibreOffice and Ms Office documents with PHP using the TinyButStrong template engine. Simple use OpenOffice - LibreOffice or Ms Office to edit your templates : DOCX, XLSX, PPTX, ODT, OSD, ODP and other formats. That is the Natural Template philosophy.
Stars: ✭ 48 (+220%)
Mutual labels:  template-engine
te4j
Fast and easy template engine
Stars: ✭ 20 (+33.33%)
Mutual labels:  template-engine
Linux Dynamic Wallpapers
Dynamic Wallpapers for Linux
Stars: ✭ 305 (+1933.33%)
Mutual labels:  dynamic
carbone
Fast and simple report generator, from JSON to pdf, xslx, docx, odt...
Stars: ✭ 810 (+5300%)
Mutual labels:  template-engine
gender-render
Template-system and proof-of-concept for rendering gender-neutral text-, email- and RPG-text-templates with the correct pronouns of all people involved.
Stars: ✭ 21 (+40%)
Mutual labels:  template-engine
leaflet.minichart
Leaflet.minichart is a leaflet plugin for adding to a leaflet map small animated charts
Stars: ✭ 27 (+80%)
Mutual labels:  dynamic
typijs
The Angular CMS Framework for building fully-featured SPA sites powered by NodeJS and MongoDB with TypeScript
Stars: ✭ 141 (+840%)
Mutual labels:  dynamic
lets-hotfix
Dynamic class reloading for java。Java代码热更新,支持本地、远程
Stars: ✭ 124 (+726.67%)
Mutual labels:  dynamic
Fuga-Framework
Web Framework for Java
Stars: ✭ 15 (+0%)
Mutual labels:  template-engine
nova-dynamic-field
Dynamic field for Laravel Nova
Stars: ✭ 18 (+20%)
Mutual labels:  dynamic
multibranch-action-triggers-plugin
MultiBranch Actions Trigger Plugin
Stars: ✭ 29 (+93.33%)
Mutual labels:  declarative
morestachio
Lightweight, powerful, flavorful, template engine.
Stars: ✭ 45 (+200%)
Mutual labels:  template-engine
dtw-python
Python port of R's Comprehensive Dynamic Time Warp algorithms package
Stars: ✭ 139 (+826.67%)
Mutual labels:  dynamic

tenjin

docs.rs crates.io

Buzzwords

  • dynamic
  • zero-allocation in render
  • logic-less
  • enables structural sharing

Template Syntax

{ if path.to.item } ... { end }
{ for item in path.to.items } ... { end }
{ include template_name }
{ path.to.item }

To escape { and }, use {{ and }}, respectively.

Macro Syntax

A macro can be used so that you can pass your own structs in as data to your templates.

context! {
    self: (TYPE PARAMETERS) TYPE {
        key1 => self.value,
        key2 => @iter self.iterable,
        key3 => @raw self.html,
        key4 => @{
            key5 => self.another_value,
            ...
        },
        ...
    }
}

You might also want to see the macros example. Note that these "contexts" are composable.

Truthiness

  1. All undefined values are falsey.
  2. Objects, maps and arrays are truthy.
  3. Booleans evaluate to their own value.
  4. Integers are truthy iff they are non-zero.
  5. Strings are truthy iff they are non-empty.
  6. Try to make truthiness as unsurprising as possible.

Contributing

Features will be added as they are needed. If you think something is missing, please open an issue!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].