Skip to content

A fast, powerful and lightweight text templating language and engine for .NET

License

Notifications You must be signed in to change notification settings

AdminToolsKit/scriban

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scriban Build status NuGet

Scriban is a fast, powerful and lightweight text templating language and engine for .NET

var template = Template.Parse("Hello {{name}}!")
var result = template.Render(new { name = "World" }); // => "Hello World!" 

The language is very versatile, easy to read and use, similar to liquid templates:

var template = Template.Parse(@"
<ul id='products'>
  {{ for product in products }}
    <li>
      <h2>{{ product.name }}</h2>
           Price: {{ product.price }}
           {{ product.description | string.truncate 15 }}
    </li>
  {{ end }}
</ul>
");
var result = template.Render(new { products = this.ProductList });

Features

Syntax Coloring

You can install the Scriban Extension for Visual Studio Code to get syntax coloring for scriban scripts (without HTML) and scriban html files.

Documentation

  • The Language for a description of the script language syntax and all the built-in functions.
  • The Runtime for the a description of the runtime API and how to use it from a .NET application.

Binaries

Scriban is available as a NuGet package: NuGet

Compatible with the following .NET framework profiles:

  • .NET3.5
  • .NET4.0+ via the PCL profile portable40-net40+sl5+win8+wp8+wpa81
  • UAP10.0+
  • NetStandard1.1 running on CoreCLR

Also Scriban.Signed NuGet package provides signed assemblies.

Benchmarks

Scriban is 1.5x to x10 times faster than existing templating engines, you will find more details in our benchmarks document.

License

This software is released under the BSD-Clause 2 license.

Related projects

  • dotliquid: .NET port of the liquid templating engine by @tgjones
  • Nustache: Logic-less templates for .NET
  • Handlebars.Net: .NET port of handlebars.js by @rexm

Credits

Adapted logo Puzzle by Andrew Doane from the Noun Project

Author

Alexandre Mutel aka xoofx.

About

A fast, powerful and lightweight text templating language and engine for .NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%