Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban 1.0.0.101

There is a newer version of this package available.
See the version list below for details.
dotnet add package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban --version 1.0.0.101
                    
NuGet\Install-Package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban -Version 1.0.0.101
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban" Version="1.0.0.101" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban" Version="1.0.0.101" />
                    
Directory.Packages.props
<PackageReference Include="Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban --version 1.0.0.101
                    
#r "nuget: Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban, 1.0.0.101"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban@1.0.0.101
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban&version=1.0.0.101
                    
Install as a Cake Addin
#tool nuget:?package=Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban&version=1.0.0.101
                    
Install as a Cake Tool

Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban

Scriban as the template engine of the notification templates of the Innovabit.DotNet.Interceptors suite.

The base package (...Notifications.Abstractions) ships a dependency-free renderer that substitutes {{ Placeholder }} and nothing else. Install this one when the wording needs logic — conditionals, loops, filters, includes — which is usually the case for an HTML e-mail.

Install

dotnet add package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban

Usage

services.AddInterceptors()
    .AddNotifications()
    .AddScribanTemplates()                    // enables templating + swaps the engine
    .AddTemplatesFromDirectory("Templates")
    .AddEmail(o => { ... });

Templates/order-failed.Email.html:


<h1>{{ ExceptionType }}</h1>
<p>{{ ExceptionMessage | html.escape }}</p>

{{ if Exception.InnerException }}
  <p>Caused by {{ Exception.InnerException.Message | html.escape }}</p>
{{ end }}

<ul>{{ for argument in Arguments }}<li>{{ argument }}</li>{{ end }}</ul>
<footer>{{ OccurredAt | date.to_string "%Y-%m-%d %H:%M" }} — {{ MachineName }}</footer>

Notes

  • Members keep their .NET names ({{ Exception.StackTrace }}), so a template reads the same under this engine and under the built-in one. Set UseScribanMemberNames = true for Scriban's own snake_case convention ({{ exception.stack_trace }}), or supply a MemberRenamer.
  • Values are not escaped automatically: pipe them through html.escape in HTML templates whenever they may carry markup.
  • An unknown variable renders empty. Set StrictVariables = true to fail loudly instead.
  • Parsed templates are cached, and a template that cannot be parsed or rendered raises a NotificationTemplateException — which the dispatcher swallows, delivering the untemplated wording rather than losing the notification.

Part of

The Innovabit.DotNet.Interceptors suite — github.com/Innovabit/dotnet-interceptors.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.122 127 11/21/2026
2.0.121 108 11/21/2026
2.0.120 90 11/21/2026
2.0.119 146 11/14/2026
2.0.118 114 11/7/2026
2.0.117 121 10/31/2026
2.0.116 115 10/26/2026
2.0.115 135 10/17/2026
2.0.114 117 10/10/2026
2.0.113 129 10/3/2026
2.0.112 137 9/28/2026
2.0.111 111 9/28/2026
2.0.110 106 9/27/2026
2.0.109 103 9/26/2026
2.0.108 104 9/26/2026
2.0.107 106 9/26/2026
2.0.106 118 9/25/2026
2.0.105 101 9/25/2026
1.0.0.104 128 9/25/2026
1.0.0.101 104 9/25/2026
Loading failed