{"id":19106544,"url":"https://github.com/wndrr/mjml-csharp","last_synced_at":"2025-06-30T03:04:15.434Z","repository":{"id":37881282,"uuid":"104943938","full_name":"Wndrr/Mjml-CSharp","owner":"Wndrr","description":"A C# wrapper for the MJML framework","archived":false,"fork":false,"pushed_at":"2023-12-15T20:20:08.000Z","size":18424,"stargazers_count":8,"open_issues_count":21,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T03:04:08.706Z","etag":null,"topics":["csharp-code","csharp-library","email-generator","email-template","markup","mjml","mjml-csharp","mjml-framework","net-core","net-framework","net-standard","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wndrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-26T22:25:35.000Z","updated_at":"2024-09-21T09:55:10.000Z","dependencies_parsed_at":"2025-04-30T18:02:59.746Z","dependency_job_id":"9e93fc3c-6de0-4fe5-a87c-f2eacbaebeae","html_url":"https://github.com/Wndrr/Mjml-CSharp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Wndrr/Mjml-CSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wndrr%2FMjml-CSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wndrr%2FMjml-CSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wndrr%2FMjml-CSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wndrr%2FMjml-CSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wndrr","download_url":"https://codeload.github.com/Wndrr/Mjml-CSharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wndrr%2FMjml-CSharp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262702325,"owners_count":23350641,"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":["csharp-code","csharp-library","email-generator","email-template","markup","mjml","mjml-csharp","mjml-framework","net-core","net-framework","net-standard","wrapper"],"created_at":"2024-11-09T04:08:37.498Z","updated_at":"2025-06-30T03:04:15.390Z","avatar_url":"https://github.com/Wndrr.png","language":"C#","readme":"# Mjml-CSharp\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWndrr%2FMjml-CSharp.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FWndrr%2FMjml-CSharp?ref=badge_shield)\n\n\nA C#.NET Wrapper for the [Mjml framework](https://mjml.io/)\n\nThe list of currently planned features and their status can be found on the project's [dashboard](https://github.com/Wndrr/Mjml-CSharp/projects/1).\n\nFor feature requests and troubleshooting you can [open an issue](https://github.com/Wndrr/Mjml-CSharp/issues/new).\n\n## Getting Started\n\nThis page will give you instructions to install the library, and the minimal code to get started using it.\n\n### Installing\n\n*note: This library has only been tested with a global installation of NodeJs v13. Aparently, it doesn't work with node v10 or v12 (as per the issue [#12](https://github.com/Wndrr/Mjml-CSharp/issues/12)*\n\nThe latest release can downloaded from [NuGet.org](https://www.nuget.org/packages/Wndrr.Mjml.CSharp). \nYou can install the package using the VisualStudio NuGet integration by searching for the `Wndrr.Mjml.CSharp` package.\n\nTo work, the Mjml wrapper requires you to have NodeJs installed and the Mjml NPM package installed in your `dependencies` or `devDependencies` section.\n \n Example `package.json`\n\n    \"devDependencies\": {\n        \"mjml\": \"^4.6.2\"\n    }\n\n### Minimal code\n\n#### Initialization\n\nYou will need to tell the library where to find node, npm and where to write temporary files. This can be done as follow, before any call to `Render()` is made :\n\n    Mjml.PathRepository.NodePath = @\"C:\\Program Files\\nodejs\\node.exe\";\n    Mjml.PathRepository.TmpPath = Path.GetTempPath();\n\n#### The simple way\n\nOnce the paths are set, you can render your MJML templates simply by calling `Mjml.Render(/* mjml */)`\n\n    var mjmlTemplate = \"\u003cmjml\u003e\u003cmj-body\u003e\u003cmj-container\u003e\u003cmj-section\u003e\u003cmj-column\u003e\u003cmj-image width=\"100\" src=\"/assets/img/logo-small.png\"\u003e\u003c/mj-image\u003e\u003cmj-divider border-color=\"#F45E43\"\u003e\u003c/mj-divider\u003e\u003cmj-text font-size=\"20px\" color=\"#F45E43\" font-family=\"helvetica\"\u003eHello World\u003c/mj-text\u003e\u003c/mj-column\u003e\u003c/mj-section\u003e\u003c/mj-container\u003e\u003c/mj-body\u003e\u003c/mjml\u003e\";\n    var outputHtml = Mjml.Render(mjmlTemplate);\n\nThe `Render` method will return a string containing the HTML compiled from the input MJML code.\n\n## Deployment\n\nBe sure to use apropriate paths for the target server. This should be improved at some point. You can refer to the [related issue](https://github.com/Wndrr/Mjml-CSharp/issues/1)\n\n## Built With\n\n[Mjml framework](https://mjml.io/) - Responsive email templating framework engine thingy thingy (these guys are cool af)\n\n## Contributing\n\nIf you are willing to improve this project, read the [contributing](CONTRIBUTING.md) page.\n\n## Versioning\n\nVersioning should be following the [SemVer v2.0.0](http://semver.org/) rules quite well (actually ... kind-of-maybe-somewhat)\n\nYou can find the released versions on the [tags page](https://github.com/Wndrr/Mjml-CSharp/tags)\n\nThe latest in-dev versions can be found on the [MyGet repo](https://www.myget.org/feed/wndrr-perso/package/nuget/Wndrr.Mjml.CSharp)\n\n## Authors\n\n* Mathieu Viales Aka. **Wndrr** \n  * [Github](https://github.com/Wndrr)\n  * [StackOverflow](https://stackoverflow.com/users/6838730/wndrr)\n  * [Blog](https://blog-mathieu.viales.fr/)\n\n## License\n\nThis project is licensed under the MIT License - see the [license](LICENSE) file for details\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWndrr%2FMjml-CSharp.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FWndrr%2FMjml-CSharp?ref=badge_large)\n\n## Acknowledgments\n\n* Thanks to the guys that made Node.exe (whoever they are)\n* Kinda thanks to the makers of npm even tho it's a pain to use it programatically\n* Thanks to the guys that made the MJML framework, give them a hi on [their slack](https://mjml.slack.com/messages/C12HESC2G/)\n* Special thanks to Iryusa and Dalefish for the help and directions\n* Super Thanks to Iryusa for the code sample\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwndrr%2Fmjml-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwndrr%2Fmjml-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwndrr%2Fmjml-csharp/lists"}