https://github.com/axuno/texttemplating
Text templating is used to dynamically render contents based on a template and a model.
https://github.com/axuno/texttemplating
csharp scriban text-template text-templating
Last synced: 11 months ago
JSON representation
Text templating is used to dynamically render contents based on a template and a model.
- Host: GitHub
- URL: https://github.com/axuno/texttemplating
- Owner: axuno
- License: lgpl-3.0
- Created: 2020-11-10T15:15:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-25T11:55:49.000Z (almost 2 years ago)
- Last Synced: 2025-06-27T10:57:56.938Z (12 months ago)
- Topics: csharp, scriban, text-template, text-templating
- Language: C#
- Homepage:
- Size: 683 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# Axuno.TextTemplating
[](https://github.com/axuno/Axuno.TextTemplating/actions?query=workflow%3A%22build+%2B+test%22)
Text templating is used to dynamically render contents based on a template and a model.
* It is based on the [Scriban library](https://github.com/lunet-io/scriban), a language that supports conditional logics, loops and much more.
* Template content can be localized.
* You can define layout templates to be used as the layout while rendering other templates.
* You can pass arbitrary objects to the template context (beside the model) for advanced scenarios.
The library is a modified version of the lightweight TextTemplating.Scriban part of [Volo.Abp.TextTemplating](https://github.com/abpframework/abp/tree/dev/framework/src/Volo.Abp.TextTemplating/Volo/Abp/TextTemplating) 7.0, (i.e., exluding the more heavy TextTemplating.Razor)
Modifications to the source code were made by axuno in 2020-23. Changes focused on:
* decouple Volo.Abp.TextTemplating from all dependencies of the Abp Framework
* replace the dependency Volo.Abp.VirtualFileSystem with a modified forked version of it ([Axuno.VirtualFileSystem](https://github.com/axuno/Axuno.VirtualFileSystem))
* use Microsoft DependencyInjection instead of [AutoFac](https://autofac.org/)
* use .Net resource files for inline localization instead JSON files
* change of namespaces
### Getting started
* [](https://www.nuget.org/packages/Axuno.TextTemplating/) Install the NuGet package
* Run the demo program included in the repo
* Read the [Scriban language](https://github.com/lunet-io/scriban) docs
* Read the [Text Templating wiki](https://github.com/axuno/Axuno.TextTemplating/wiki)