All Projects → korlibs → korte

korlibs / korte

Licence: MIT license
Kotlin cORoutines Template Engine for Multiplatform Kotlin

Programming Languages

kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to korte

NoMansWallpaperApp
Looking for your next No Man's Sky wallpaper?
Stars: ✭ 35 (-49.28%)
Mutual labels:  coroutines, kotlin-coroutines
dry
Dry is a new template engine and language, and is a superset of Shopify's Liquid, with first-class support for advanced inheritance features, and more. From the creators of Enquirer, Assemble, Remarkable, and Micromatch.
Stars: ✭ 66 (-4.35%)
Mutual labels:  template-engine, liquid
kotlin-coroutines-android
Useful extensions for coroutines. AutoDispose + MainScope
Stars: ✭ 84 (+21.74%)
Mutual labels:  coroutines, kotlin-coroutines
CoroutineLite
Simple implementation of kotlinx.coroutines to clarify the design of Kotlin Coroutines.
Stars: ✭ 142 (+105.8%)
Mutual labels:  coroutines, kotlin-coroutines
liquidpy
A port of liquid template engine for python
Stars: ✭ 49 (-28.99%)
Mutual labels:  template-engine, liquid
liquid.cr
Kind of liquid template engine for Crystal [WIP]
Stars: ✭ 64 (-7.25%)
Mutual labels:  template-engine, liquid
AndroidCoroutineScopes
This lib implements the most common CoroutineScopes used in Android apps.
Stars: ✭ 14 (-79.71%)
Mutual labels:  coroutines, kotlin-coroutines
Foil
PHP template engine for native PHP templates
Stars: ✭ 162 (+134.78%)
Mutual labels:  twig, template-engine
SketchwareManager
Coroutine-based library for managing Sketchware (Sketchware Pro/Studio) projects, collections and etc.
Stars: ✭ 54 (-21.74%)
Mutual labels:  coroutines, kotlin-coroutines
Magento2-Twig
Twig Template Engine for Magento2
Stars: ✭ 58 (-15.94%)
Mutual labels:  twig, template-engine
Delish
Delish, a Food Recipes App in Jetpack Compose and Hilt based on modern Android tech-stacks and MVI clean architecture.
Stars: ✭ 356 (+415.94%)
Mutual labels:  coroutines, kotlin-coroutines
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+79.71%)
Mutual labels:  coroutines, kotlin-coroutines
the-white-rabbit
The White Rabbit is an asynchronous RabbitMQ (AMQP) client based on Kotlin coroutines
Stars: ✭ 90 (+30.43%)
Mutual labels:  coroutines, kotlin-coroutines
StarWarsSearch-MVI
Star wars sample android project showcasing the use of View components for rendering UI in Fragments and Activities. Uses Android Jetpack, clean architecture with MVI (Uni-directional data flow), dagger hilt, and kotlin coroutines with StateFlow
Stars: ✭ 189 (+173.91%)
Mutual labels:  coroutines, kotlin-coroutines
liquid
A Python engine for the Liquid template language.
Stars: ✭ 40 (-42.03%)
Mutual labels:  template-engine, liquid
mqtt
Kotlin cross-platform, coroutine based, reflectionless MQTT 3.1.1 & 5.0 client & server
Stars: ✭ 31 (-55.07%)
Mutual labels:  coroutines, kotlin-coroutines
Yii2 Twig
Yii 2 Twig extension.
Stars: ✭ 130 (+88.41%)
Mutual labels:  twig, template-engine
Stick
A golang port of the Twig templating engine
Stars: ✭ 132 (+91.3%)
Mutual labels:  twig, template-engine
NewsReader
Android News Reader app. Kotlin Coroutines, Retrofit and Realm
Stars: ✭ 21 (-69.57%)
Mutual labels:  coroutines, kotlin-coroutines
android-clean-arc-coroutines
Clean Architecture(Coroutines,Dagger, MVVM, ROOM, retrofit, databinding)
Stars: ✭ 116 (+68.12%)
Mutual labels:  coroutines, kotlin-coroutines

Korte

Korte

Template Engine for Multiplatform Kotlin

Build Status Maven Central Discord

Full Documentation: https://korlibs.soywiz.com/korte/

Info:

KorTE is an asynchronous templating engine for Multiplatform Kotlin 1.3+.

It is a non-strict super set of twig / django / atpl.js template engines and can support liquid templating engine as well with frontmatter.

It has out of the box support for ktor and vert.x.

It works on JVM and JS out of the box. And on Native with untyped model data or by making the models implement the DynamicType interface.

Because asynchrony is in its name and soul, it allows to call suspending methods from within your templates.

Documentation:

Live demo

Example

resources/views/_base.html

<html><head></head><body>
{% block content %}default content{% endblock %}
</body></html>

resources/views/_two_columns.html

{% extends "_base.html" %}
{% block content %}
    <div>{% block left %}default left column{% endblock %}</div>
    <div>{% block right %}default right column{% endblock %}</div>
{% endblock %}

resources/views/index.html

{% extends "_two_columns.html" %}
{% block left %}
    My left column. Hello {{ name|upper }}
{% endblock %}
{% block right %}
    My prefix {{ parent() }} with additional content
{% endblock %}

code.kt

val renderer = Templates(ResourceTemplateProvider("views"), cache = true)
val output = templates.render("index.html", mapOf("name" to "world"))
println(output)

class ResourceTemplateProvider(private val basePath: String) : TemplateProvider {
     override suspend fun get(template: String): String? {
         return this::class.java.classLoader.getResource(Paths.get(basePath, template).toString()).readText()
     }
 }
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].