-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Trais McAllister edited this page Sep 3, 2024
·
3 revisions
To use MtconnectTranspiler.CodeGenerators.ScribanTemplates in your project, follow these steps.
- .NET Core 3.1 or higher
- Visual Studio or a compatible IDE
- Open your project in Visual Studio.
- Right-click on your project and select "Manage NuGet Packages."
- Search for
MtconnectTranspiler.CodeGenerators.ScribanTemplates. - Click "Install."
Alternatively, you can install the package via the NuGet CLI:
dotnet add package MtconnectTranspiler.CodeGenerators.ScribanTemplatesIn your Startup.cs or Program.cs, add the Scriban services:
services.AddScribanServices(builder =>
{
builder
.UseTemplatesPath("path/to/templates")
.UseResourceAssembly(typeof(YourProjectClass).Assembly, "YourProjectNamespace.EmbeddedTemplates")
.AddMarkdownInterpreter("custom", new CustomMarkdownInterpreter())
.AddCodeFormatter("csharp", new CSharpCodeFormatter());
});Next, you're ready to start using the template generation system.