Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban 1.0.0.96

dotnet add package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban --version 1.0.0.96
                    
NuGet\Install-Package Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban -Version 1.0.0.96
                    
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.96" />
                    
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.96" />
                    
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.96
                    
#r "nuget: Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban, 1.0.0.96"
                    
#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.96
                    
#: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.96
                    
Install as a Cake Addin
#tool nuget:?package=Innovabit.DotNet.Interceptors.Notifications.Templating.Scriban&version=1.0.0.96
                    
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
1.0.0.96 95 9/12/2026
1.0.0.95 136 9/5/2026