{"id":13419992,"url":"https://github.com/kainjow/Mustache","last_synced_at":"2025-03-15T06:31:10.710Z","repository":{"id":30235928,"uuid":"33787085","full_name":"kainjow/Mustache","owner":"kainjow","description":"Mustache text templates for modern C++","archived":false,"fork":false,"pushed_at":"2023-12-09T16:31:30.000Z","size":634,"stargazers_count":355,"open_issues_count":2,"forks_count":49,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-14T08:11:02.640Z","etag":null,"topics":["c-plus-plus","mustache"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kainjow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-04-11T18:23:45.000Z","updated_at":"2024-10-02T02:21:51.000Z","dependencies_parsed_at":"2024-01-18T19:04:13.071Z","dependency_job_id":"6c67b9a3-1aca-43bd-beea-62e09a3568b7","html_url":"https://github.com/kainjow/Mustache","commit_stats":{"total_commits":318,"total_committers":13,"mean_commits":24.46153846153846,"dds":"0.42452830188679247","last_synced_commit":"04277d5552c6e46bee41a946b7d175a660ea1b3d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kainjow%2FMustache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kainjow%2FMustache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kainjow%2FMustache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kainjow%2FMustache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kainjow","download_url":"https://codeload.github.com/kainjow/Mustache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221548242,"owners_count":16840981,"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":["c-plus-plus","mustache"],"created_at":"2024-07-30T22:01:24.058Z","updated_at":"2025-03-15T06:31:10.691Z","avatar_url":"https://github.com/kainjow.png","language":"C++","readme":"# About\n\n* [Mustache](http://mustache.github.io) implementation for modern C++ (requires C++11)\n* Header only\n* Zero dependencies\n* Templated string type for compatibility with any STL-like string (std::string, std::wstring, etc)\n* Boost license\n\n[![travis](https://travis-ci.org/kainjow/Mustache.svg?branch=master)](https://travis-ci.org/kainjow/Mustache) [![appveyor](https://ci.appveyor.com/api/projects/status/6uh5d5weajrffkyw?svg=true)](https://ci.appveyor.com/project/kainjow/mustache) [![ghe](https://github.com/kainjow/Mustache/workflows/Tests/badge.svg)](https://github.com/kainjow/Mustache/actions) [![codecov](https://codecov.io/gh/kainjow/Mustache/branch/master/graph/badge.svg)](https://codecov.io/gh/kainjow/Mustache)\n\n## Example usage\n\nAll examples assume `using namespace kainjow::mustache`. Additional examples and usage can be found in the `tests.cpp` file.\n\n### Example 1 - Hello World\n\n````cpp\nmustache tmpl{\"Hello {{what}}!\"};\nstd::cout \u003c\u003c tmpl.render({\"what\", \"World\"}) \u003c\u003c std::endl;\n// Hello World!\n````\n\n### Example 2 - Lists\n\n````cpp\nmustache tmpl{\"{{#employees}}{{name}}, {{/employees}}\"};\ndata employees{data::type::list};\nemployees \u003c\u003c data{\"name\", \"Steve\"} \u003c\u003c data{\"name\", \"Bill\"};\ntmpl.render({\"employees\", employees}, std::cout);\n// Steve, Bill,\n````\n\n### Example 3 - Custom Render Handler\n\n````cpp\nmustache tmpl(\"Hello {{what}}!\");\nstd::stringstream ss;\ntmpl.render({\"what\", \"World\"}, [\u0026ss](const std::string\u0026 str) {\n    ss \u003c\u003c str;\n});\n// ss.str() == \"Hello World!\"\n````\n\n## Supported Features\n\nThis library supports all current Mustache features:\n\n- Variables\n- HTML escaping\n- Sections\n- Inverted Sections\n- True/False\n- Lists\n- Lambdas\n- Partials\n- Comments\n- Set Delimiter\n\nAdditional features:\n\n- Custom escape function for use outside of HTML\n","funding_links":[],"categories":["TODO scan for Android support in followings","Libraries"],"sub_categories":["String formatting \u0026 templating"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkainjow%2FMustache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkainjow%2FMustache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkainjow%2FMustache/lists"}