{"id":13495219,"url":"https://github.com/eta-dev/eta","last_synced_at":"2025-05-14T03:11:27.776Z","repository":{"id":37371913,"uuid":"250142018","full_name":"eta-dev/eta","owner":"eta-dev","description":"Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript","archived":false,"fork":false,"pushed_at":"2024-08-26T18:01:03.000Z","size":2573,"stargazers_count":1495,"open_issues_count":21,"forks_count":64,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-13T06:03:11.167Z","etag":null,"topics":["deno","deno-module","ejs-alternative","expressjs-templating-engine","javascript","nodejs","template-engine","template-engine-html","typescript"],"latest_commit_sha":null,"homepage":"https://eta.js.org","language":"TypeScript","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/eta-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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},"funding":{"github":["nebrelbug"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/bengubler"]}},"created_at":"2020-03-26T02:30:08.000Z","updated_at":"2025-05-11T07:59:21.000Z","dependencies_parsed_at":"2023-11-30T01:44:39.625Z","dependency_job_id":"2b9959c8-9dea-433f-9149-888ad8b32829","html_url":"https://github.com/eta-dev/eta","commit_stats":{"total_commits":573,"total_committers":32,"mean_commits":17.90625,"dds":0.2774869109947644,"last_synced_commit":"760a1f1f9dfe181f34a3f2ce81247385066d6311"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eta-dev%2Feta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eta-dev%2Feta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eta-dev%2Feta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eta-dev%2Feta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eta-dev","download_url":"https://codeload.github.com/eta-dev/eta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059520,"owners_count":22007771,"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":["deno","deno-module","ejs-alternative","expressjs-templating-engine","javascript","nodejs","template-engine","template-engine-html","typescript"],"created_at":"2024-07-31T19:01:32.570Z","updated_at":"2025-05-14T03:11:22.767Z","avatar_url":"https://github.com/eta-dev.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg align=\"center\" width=\"50%\" src=\"https://github.com/eta-dev/eta/assets/25597854/041dbe34-883b-459b-8607-c787815c441a\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\" style=\"text-align: center; width: fit-content; margin-left: auto; margin-right: auto;\"\u003eeta (η)\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://eta.js.org\"\u003eDocumentation\u003c/a\u003e -\n  \u003ca href=\"https://discord.gg/27gGncJYE2\"\u003eChat\u003c/a\u003e -\n  \u003ca href=\"https://runkit.com/nebrelbug/eta-v3\"\u003eRunKit Demo\u003c/a\u003e -\n  \u003ca href=\"https://eta.js.org/playground\"\u003ePlayground\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[logo]: https://img.shields.io/badge/all_contributors-10-orange.svg \"Number of contributors on All-Contributors\"\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n\u003cspan align=\"center\"\u003e\n\n[![GitHub package.json version (main)](https://img.shields.io/github/package-json/v/eta-dev/eta/main?label=current%20version)](https://www.npmjs.com/package/eta)\n[![GitHub Actions Status](https://github.com/eta-dev/eta/actions/workflows/test.yml/badge.svg)](https://github.com/eta-dev/eta/actions)\n[![All Contributors][logo]](#contributors-)\n[![Coveralls](https://img.shields.io/coveralls/eta-dev/eta.svg?branch=main)](https://coveralls.io/github/eta-dev/eta?branch=main)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg)](https://paypal.me/bengubler)\n\n\u003c/span\u003e\n\n\u003cspan align=\"center\"\u003e\n\n**You're viewing the source for Eta v3, which we just released! For v2, visit [the old branch](https://github.com/eta-dev/eta/tree/v2).**\n\n\u003c/span\u003e\n\n## Summary\n\nEta is a lightweight and blazing fast embedded JS templating engine that works inside Node, Deno, and the browser. It's written in TypeScript and emphasizes great performance, configurability, and small bundle size.\n\n### 🌟 Features\n\n- 📦 0 dependencies\n- 💡 Only ~3.5 KB minzipped\n- ⚡️ Written in TypeScript\n- ✨ Deno support (+ Node and browser)\n- 🚀 Super Fast\n- 🔧 Configurable\n  - Plugins, custom delimiters, caching\n- 🔨 Powerful\n  - Precompilation, partials, async\n  - **Layout support**!\n- 🔥 Reliable\n  - Better quotes/comments support\n    - _ex._ `\u003c%= someval + \"string %\u003e\" %\u003e` compiles correctly, while it fails with doT or EJS\n  - Great error reporting\n- ⚡️ Exports ES Modules as well as UMD\n- 📝 Easy template syntax\n\n## Get Started\n\n_For more thorough documentation, visit [https://eta.js.org](https://eta.js.org)_\n\nInstall Eta\n\n```bash\nnpm install eta\n```\n\nIn the root of your project, create `templates/simple.eta`\n\n```eta\nHi \u003c%= it.name %\u003e!\n```\n\nThen, in your JS file:\n\n```js\nimport { Eta } from \"eta\";\n// import { Eta } from \"https://deno.land/x/eta@v3.1.0/src/index.ts\";\n\nconst eta = new Eta({ views: path.join(__dirname, \"templates\") });\n\n// Render a template\n\nconst res = eta.render(\"./simple\", { name: \"Ben\" });\nconsole.log(res); // Hi Ben!\n```\n\n## FAQs\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eWhere did Eta's name come from?\u003c/b\u003e\n  \u003c/summary\u003e\n\n\"Eta\" means tiny in Esperanto. Plus, it can be used as an acronym for all sorts of cool phrases: \"ECMAScript Template Awesomeness\", \"Embedded Templating Alternative\", etc....\n\nAdditionally, Eta is a letter of the Greek alphabet (it stands for all sorts of cool things in various mathematical fields, including efficiency) and is three letters long (perfect for a file extension).\n\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\n## Integrations\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eVisual Studio Code\u003c/b\u003e\n  \u003c/summary\u003e\n\n[@shadowtime2000](https://github.com/shadowtime2000) created [eta-vscode](https://marketplace.visualstudio.com/items?itemName=shadowtime2000.eta-vscode).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eESLint\u003c/b\u003e\n  \u003c/summary\u003e\n\n[eslint-plugin-eta](https://github.com/eta-dev/eslint-plugin-eta) was created to provide an ESLint processor so you can lint your Eta templates.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eWebpack\u003c/b\u003e\n  \u003c/summary\u003e\n\nCurrently there is no official Webpack integration but [@clshortfuse](https://github.com/clshortfuse) shared the loader he uses:\n\n```javascript\n{\n  loader: 'html-loader',\n  options: {\n    preprocessor(content, loaderContext) {\n      return eta.render(content, {}, { filename: loaderContext.resourcePath });\n    },\n  },\n}\n```\n\n\u003c/details\u003e\n  \n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eNode-RED\u003c/b\u003e\n  \u003c/summary\u003e\n\nTo operate with Eta templates in Node-RED: [@ralphwetzel/node-red-contrib-eta](https://flows.nodered.org/node/@ralphwetzel/node-red-contrib-eta)\n\n  \u003cimg width=\"150\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16342003/160198427-2a69ff10-e8bf-4873-9d99-2929a584ccc8.png\"\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003eKoa\u003c/b\u003e\n  \u003c/summary\u003e\n\nTo render Eta templates in [Koa](https://koajs.com) web framework: [@cedx/koa-eta](https://github.com/cedx/koa-eta/wiki)\n\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\n## Projects using `eta`\n\n- [Docusaurus v2](https://v2.docusaurus.io): open-source documentation framework that uses Eta to generate a SSR build\n- [swagger-typescript-api](https://github.com/acacode/swagger-typescript-api): Open source typescript api codegenerator from Swagger. Uses Eta as codegenerator by templates\n- [html-bundler-webpack-plugin](https://github.com/webdiscus/html-bundler-webpack-plugin): Webpack plugin make easily to bundle HTML pages from templates, source styles and scripts\n- [SmartDeno](https://github.com/guildenstern70/SmartDeno): SmartDeno is an easy to setup web template using Deno \u0026 Oak\n- [stc](https://github.com/long-woo/stc): OpenAPI (Swagger) and Apifox documentation converted to api. Use eta templates to generate code.\n- [Add yours!](https://github.com/eta-dev/eta/edit/master/README.md)\n\n## Contributors\n\nMade with ❤ by [@nebrelbug](https://github.com/eta-dev) and all these wonderful contributors ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.bengubler.com\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/25597854?v=4?s=100\" width=\"100px;\" alt=\"Ben Gubler\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBen Gubler\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=nebrelbug\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#question-nebrelbug\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/eta-dev/eta/commits?author=nebrelbug\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/eta-dev/eta/commits?author=nebrelbug\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/clitetailor\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/16368559?v=4?s=100\" width=\"100px;\" alt=\"Clite Tailor\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eClite Tailor\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-clitetailor\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/eta-dev/eta/commits?author=clitetailor\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://twitter.com/ioan_chiriac\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/173203?v=4?s=100\" width=\"100px;\" alt=\"Ioan CHIRIAC\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eIoan CHIRIAC\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=ichiriac\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-ichiriac\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.linkedin.com/in/craig-morten/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/46491566?v=4?s=100\" width=\"100px;\" alt=\"Craig Morten\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCraig Morten\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=asos-craigmorten\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/trojanh\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/22974490?v=4?s=100\" width=\"100px;\" alt=\"Rajan Tiwari\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRajan Tiwari\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#example-trojanh\" title=\"Examples\"\u003e💡\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://shadowtime2000.github.io\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/66655515?v=4?s=100\" width=\"100px;\" alt=\"shadowtime2000\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eshadowtime2000\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=shadowtime2000\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-shadowtime2000\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/eta-dev/eta/commits?author=shadowtime2000\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://hamidihamza.com\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/22576950?v=4?s=100\" width=\"100px;\" alt=\"Hamza Hamidi\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHamza Hamidi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=hamzahamidi\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://calumk.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1183991?v=4?s=100\" width=\"100px;\" alt=\"Calum Knott\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCalum Knott\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-calumk\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/nhaef\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/16443053?v=4?s=100\" width=\"100px;\" alt=\"nhaef\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003enhaef\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=nhaef\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://heyhey.to/Gün\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/74139498?v=4?s=100\" width=\"100px;\" alt=\"Gün\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGün\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/eta-dev/eta/commits?author=gurgunday\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!\n\n## Credits\n\n- Async support, file handling, and error formatting were based on code from [EJS](https://github.com/mde/ejs), which is licensed under the Apache-2.0 license. Code was modified and refactored to some extent.\n- Syntax and some parts of compilation are heavily based off EJS, Nunjucks, and doT.\n","funding_links":["https://github.com/sponsors/nebrelbug","https://paypal.me/bengubler"],"categories":["TypeScript","Packages","Modules","typescript"],"sub_categories":["Template engines","Template engine","Assistants"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feta-dev%2Feta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feta-dev%2Feta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feta-dev%2Feta/lists"}