{"id":13375997,"url":"https://github.com/StubbleOrg/Stubble","last_synced_at":"2025-03-13T01:31:53.059Z","repository":{"id":34116724,"uuid":"37947067","full_name":"StubbleOrg/Stubble","owner":"StubbleOrg","description":"Trimmed down {{mustache}} templates in .NET","archived":false,"fork":false,"pushed_at":"2023-07-19T14:24:03.000Z","size":1854,"stargazers_count":419,"open_issues_count":14,"forks_count":59,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-10T19:55:11.761Z","etag":null,"topics":["generation","mustache","mustache-templating","speed","templates","text"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StubbleOrg.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-06-23T21:51:19.000Z","updated_at":"2025-03-08T08:23:03.000Z","dependencies_parsed_at":"2024-01-02T22:49:59.142Z","dependency_job_id":null,"html_url":"https://github.com/StubbleOrg/Stubble","commit_stats":{"total_commits":472,"total_committers":13,"mean_commits":36.30769230769231,"dds":"0.029661016949152574","last_synced_commit":"7e5bab6c69d90ab898b84c158969495c0e05bbac"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StubbleOrg%2FStubble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StubbleOrg%2FStubble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StubbleOrg%2FStubble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StubbleOrg%2FStubble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StubbleOrg","download_url":"https://codeload.github.com/StubbleOrg/Stubble/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243322500,"owners_count":20272890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["generation","mustache","mustache-templating","speed","templates","text"],"created_at":"2024-07-30T05:02:13.290Z","updated_at":"2025-03-13T01:31:52.519Z","avatar_url":"https://github.com/StubbleOrg.png","language":"C#","funding_links":[],"categories":["C\\#","C#","C# #"],"sub_categories":[],"readme":"# Stubble [![Build Status](https://dev.azure.com/stubble/Stubble/_apis/build/status/StubbleOrg.Stubble?branchName=master)](https://dev.azure.com/stubble/Stubble/_build/latest?definitionId=2\u0026branchName=master) [![codecov](https://codecov.io/gh/StubbleOrg/Stubble/branch/master/graph/badge.svg)](https://codecov.io/gh/StubbleOrg/Stubble) [![Pre-release Build Nuget](https://img.shields.io/nuget/vpre/Stubble.Core.svg?style=flat-square\u0026label=nuget%20pre)](https://www.nuget.org/packages/Stubble.Core/) [![Stable Nuget](https://img.shields.io/nuget/v/Stubble.Core.svg?style=flat-square)](https://www.nuget.org/packages/Stubble.Core/)\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" src=\"assets/logo-256.png\"\u003e\n\n### Trimmed down {{mustache}} templates in .NET\n\nStubble is an implementation of the [Mustache](https://mustache.github.io/) template system in C# (but is usable from any .NET language).\n\nFor a language-agnostic overview of mustache's template syntax, see the `mustache(5)` [manpage](https://mustache.github.io/mustache.5.html).\n\nStubble is tested against the mustache specification and is `v.1.1.2, including lambdas` compliant, this means that your templates in other languages will work with Stubble provided they match the spec!\n\nIt is licensed under the MIT License which can be found [here.](/licence.md)\n\n### Why should I use Stubble?\n\nStubble is designed to be a spec compliant mustache renderer with only the bare essentials, _you could say the rest has been trimmed down!_\n\nStubble provides no methods of finding your templates, no complicated logic for getting values from your objects or special types, no non-spec tags for rendering or logic and only the necessaries to make it a simple and fast parser and renderer.\n\n### Okay I'm convinced, how do I get it and use it?\n\nStubble is available on Nuget.org which can be acessed by clicking on the badge above! Another option for the more adventurous is to download the source and build it yourself.\n\nFor how to use Stubble I'd recommend reading the how to use guide [here.](/docs/how-to.md)\n\n### Performance\n\nWe use [BenchmarkDotNet](benchmarkdotnet.org) to optimize our performance to to allow us to compare our _real_ performance against our closest comparable measure which is [Nustache](https://github.com/jdiamond/Nustache/).\n\nOur benchmarks can be found in the repo and we test using the Tweet benchmarks found in the [Mustache.java](https://github.com/spullara/mustache.java) repository that we have implemented in C#. We've tried to be as fair as possible giving each their optimal scenario so we can focus on raw numbers.\n\nThe test itself measures how long it takes to render a timeline of tweets with partials, inverted sections default values and missing data.\n\n![image](/docs/Benchmarks.png)\n\nThe numbers here represent the baseline values graphed from the timeline test with warm-ups and outliers removed, please feel free to checkout the repository and run the benchmarks to verify the results or if there's a better way to benchmark the library, we're always open to improvements.\n\n### Extensibility\n\nStubble exposes certain internal structures for parsing and rendering extensions to be added in a loosely coupled way.\nThese extensions can be added on to the `IRendererSettingsBuilder` as extension methods to simplify it for users.\n\nFor more detail on the types of Extensibility and how to extend stubble please see the [extensibility docs here.](/docs/extensibility.md).\n\n### Compilation\n\nStubble provides compilation of templates to functions that take strongly typed arguments based on how you configure the stubble template compiler.\nTo use compilation, simple create a `StubbleCompilationRenderer` and call Compile or Compile async after configuring it.\n\nFor more detailed information and edgecases please see the [compilation docs here.](/docs/compilation.md).\n\n### Template Loading\n\nStubble comes in the box with very few template loaders but provides an interface and extension points which allow you to provide your own async and sync methods to get templates from a given name or use one that has already been created in a separate package.\n\nThe implementation of this feature is heavily inspired by [bobthecow's](https://github.com/bobthecow/) implementation of loaders in [mustache.php](https://github.com/bobthecow/mustache.php/).\n\nFor more detail on template loading please see the [template loading docs here.](/docs/template-loading.md).\n\n### Why not use [Nustache](https://github.com/jdiamond/Nustache/) instead?\n\nIf Stubble doesn't do what you need then you should use Nustache! It's a great tool and provides the same base functionality as Stubble provides for the default Mustache spec _(I know because I'm a contributor and current maintainer of that project!)_.\n\nHowever it does provide lots of extra features, such as a variety of input types, helpers and compilation which increases its complexity and some which are extensions to the Mustache spec (such as helpers). If you need any of those pieces of functionality I'd highly recommend you use Nustache... at least until there are Extensions for Stubble which provide the functionality your after!\n\n## Credits\n\nStraight Razor by Vectors Market from the Noun Project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStubbleOrg%2FStubble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStubbleOrg%2FStubble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStubbleOrg%2FStubble/lists"}