{"id":39663682,"url":"https://github.com/devantler-tech/dotnet-template-engine","last_synced_at":"2026-01-18T09:26:24.873Z","repository":{"id":247396005,"uuid":"825464574","full_name":"devantler-tech/dotnet-template-engine","owner":"devantler-tech","description":"A simple template engine for .NET. Built with Scriban.","archived":false,"fork":false,"pushed_at":"2025-11-25T11:41:43.000Z","size":251,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T17:31:28.245Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devantler-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-07T21:07:48.000Z","updated_at":"2025-11-25T11:41:12.000Z","dependencies_parsed_at":"2025-11-28T03:08:13.000Z","dependency_job_id":null,"html_url":"https://github.com/devantler-tech/dotnet-template-engine","commit_stats":null,"previous_names":["devantler/dotnet-template-engine","devantler-tech/dotnet-template-engine"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/devantler-tech/dotnet-template-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devantler-tech%2Fdotnet-template-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devantler-tech%2Fdotnet-template-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devantler-tech%2Fdotnet-template-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devantler-tech%2Fdotnet-template-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devantler-tech","download_url":"https://codeload.github.com/devantler-tech/dotnet-template-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devantler-tech%2Fdotnet-template-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library"],"created_at":"2026-01-18T09:26:24.779Z","updated_at":"2026-01-18T09:26:24.852Z","avatar_url":"https://github.com/devantler-tech.png","language":"C#","readme":"# 📄 .NET Template Engine\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Test](https://github.com/devantler-tech/dotnet-template-engine/actions/workflows/test.yaml/badge.svg)](https://github.com/devantler-tech/dotnet-template-engine/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/devantler-tech/dotnet-template-engine/graph/badge.svg?token=RhQPb4fE7z)](https://codecov.io/gh/devantler-tech/dotnet-template-engine)\n\nA simple template engine for .NET.\n\n## 🚀 Getting Started\n\nTo get started, you can install the package from NuGet.\n\n```bash\ndotnet add package DevantlerTech.TemplateEngine\n```\n\n## 📝 Usage\n\n\u003e [!NOTE]\n\u003e The template engine uses [Scriban](https://github.com/scriban/scriban) under the hood. So to learn more about the syntax, you can visit the [Scriban documentation](https://github.com/scriban/scriban/blob/master/doc/language.md).\n\nTo render a template, you can use the `Generator` class or the `TemplateEngine` class directly.\n\n```csharp\nusing DevantlerTech.TemplateEngine;\n\nvar templateEngine = new TemplateEngine();\nvar generator = new Generator(templateEngine);\n\nvar template = \"Hello, {{name}}!\"; // or \"/path/to/template\"\nvar model = new { Name = \"World\" };\n\nstring resultFromEngine = templateEngine.Render(template, model);\nstring resultFromGenerator = await generator.GenerateAsync(template, model);\n\n```\n\nYou can also generate a file from a template.\n\n```csharp\nusing DevantlerTech.TemplateEngine;\n\nvar generator = new Generator(new TemplateEngine());\n\nvar template = \"Hello, {{name}}!\"; // or \"/path/to/template\"\nvar model = new { Name = \"World\" };\nvar outputPath = \"hello.txt\";\n\nawait generator.GenerateAsync(outputPath, template, model);\n```\n\nBoth of these scenarios will render `Hello, World!` as the output, since the `name` property is set to `World`, and the template is `Hello, {{name}}!`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevantler-tech%2Fdotnet-template-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevantler-tech%2Fdotnet-template-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevantler-tech%2Fdotnet-template-engine/lists"}