{"id":14986774,"url":"https://github.com/daaain/handlebars","last_synced_at":"2025-08-27T05:18:54.791Z","repository":{"id":3914398,"uuid":"5003487","full_name":"daaain/Handlebars","owner":"daaain","description":"Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.","archived":false,"fork":false,"pushed_at":"2023-11-03T12:28:50.000Z","size":139,"stargazers_count":300,"open_issues_count":15,"forks_count":48,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-25T21:07:52.461Z","etag":null,"topics":["handlebars","html","html-tags","mustache","sublime-text","sublime-text-plugin","syntax-highlighting","template","visual-studio-code"],"latest_commit_sha":null,"homepage":"","language":"Handlebars","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/daaain.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-07-12T13:11:08.000Z","updated_at":"2025-02-25T06:01:48.000Z","dependencies_parsed_at":"2022-08-25T16:01:06.875Z","dependency_job_id":"ec99d9e5-0a6f-4643-b2d8-b8c1290d6766","html_url":"https://github.com/daaain/Handlebars","commit_stats":{"total_commits":139,"total_committers":18,"mean_commits":7.722222222222222,"dds":"0.24460431654676262","last_synced_commit":"9fb01fefe48532deb901926cd80774215b454ff9"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/daaain/Handlebars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaain%2FHandlebars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaain%2FHandlebars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaain%2FHandlebars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaain%2FHandlebars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daaain","download_url":"https://codeload.github.com/daaain/Handlebars/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaain%2FHandlebars/sbom","scorecard":{"id":316103,"data":{"date":"2025-08-11","repo":{"name":"github.com/daaain/Handlebars","commit":"9fb01fefe48532deb901926cd80774215b454ff9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:12:55.477Z","repository_id":3914398,"created_at":"2025-08-18T00:12:55.477Z","updated_at":"2025-08-18T00:12:55.477Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272294560,"owners_count":24908839,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"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":["handlebars","html","html-tags","mustache","sublime-text","sublime-text-plugin","syntax-highlighting","template","visual-studio-code"],"created_at":"2024-09-24T14:13:30.762Z","updated_at":"2025-08-27T05:18:54.757Z","avatar_url":"https://github.com/daaain.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sublime Text 2 / 3 Handlebars.js bundle\n\n- Colours of Handlebars expressions are selected to be in contrast with the surrounding HTML.\n- Handlebars expressions get syntax highlighting in HTML attributes.\n- Parameters passed to block expressions get syntax highlighting too.\n- Works both with individual template files and inline templates in script tags.\n- Key bindings for `{{! Handlebars comments }}` (Sublime only)\n- \u003ckbd\u003eTab\u003c/kbd\u003e triggers for\n  - `if` → `{{#if }}`\n  - `ifel` → `{{#if }} {{else}}`\n  - `el` → `{{else}}`\n  - `elif` → `{{else if }}`\n  - `un` → `{{#unless }}`\n  - `ea` → `{{#each }}`\n  - `wi` → `{{#with }}`\n  - `par` → `{{\u003e }}` (for partials)\n  - `x-temp` → `\u003cscript type=\"text/x-handlebars\" data-template-name=\"$1\"\u003e` (inline script tag in HTML files using the Ember recommended `data-template-name` attribute)\n  - `x-id` → `\u003cscript type=\"text/x-handlebars-template\" id=\"$1\"\u003e` (inline script tag in HTML files using the legacy `id` attribute)\n\nSince (as of February 2017) the syntax definitions in this repository are driving the highlights on [Github](https://github.com/github/linguist/tree/master/vendor) and in [Visual Studio Code](https://github.com/Microsoft/vscode/tree/master/extensions/handlebars), it's fair game to open issues related to either of these 😺\n\n## About Handlebars.js\n\nIt's a great JavaScript templating engine, based on [Mustache](http://mustache.github.com/), but amongst others adding the ability to precompile templates and to create custom helpers.\n\nOfficial website: [handlebarsjs.com](http://handlebarsjs.com/)\n\n## Sublime Text installation\n\nGet it through [Sublime Package Control](https://packagecontrol.io/).\n\nIf you haven't used it yet, just install it from the link above and then:\n\n1. Press \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eCmd\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e (OS X) or \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e (Windows)\n2. Type `install`, to bring up the `Package Control: Install Package` option, and press Enter\n3. Look for `Handlebars`, and press Enter to install it.\n4. Choose `Handlebars` in the bottom right corner with one of your template files open (or in case you have inline templates use Handlebars instead of HTML, it's gracefully extending it so you shouldn't lose anything)\n5. Profit\n\nPackage Control will also auto-update the package from this point on!\n\n## Known problems and workarounds\n\n### Sublime: No auto-complete on closing HTML tags ([#23](https://github.com/daaain/Handlebars/issues/23) \u0026 [#49](https://github.com/daaain/Handlebars/issues/49))\n\n**Problem**: when closing an HTML tag, the tag name doesn't get auto-completed after typing \u003ckbd\u003e/\u003c/kbd\u003e (or when using the \u003ckbd\u003eCmd\u003c/kbd\u003e + \u003ckbd\u003eAlt\u003c/kbd\u003e + \u003ckbd\u003e.\u003c/kbd\u003e (OS X) shortcut anywhere), even though this is the default behaviour with the HTML package.\n\n**Solution**: installing the [Tag](https://packagecontrol.io/packages/Tag) package re-instates these functionalities and seems to be working well with this one.\n\n### Sublime: HTML tag pair doesn't get highlighted ([#48](https://github.com/daaain/Handlebars/issues/48))\n\n**Problem**: moving the cursor over an HTML tag doesn't highlight its pair.\n\n**Solution**: installing the [BracketHighlighter](https://packagecontrol.io/packages/BracketHighlighter) package nicely solves the problem and adds much more powerful bracket matching than the built-in one.\n\n### Sublime: Expand selection to tag doesn't work ([#47](https://github.com/daaain/Handlebars/issues/47))\n\n**Problem**: Expanding selection to tag doesn't work (Sublime command: `expand_selection {\"to\": \"tag\"}`).\n\n**Solution**: if you install the [Emmet](https://packagecontrol.io/packages/Emmet) package you can use the `Match Tag Pair` functionality by pressing \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eD\u003c/kbd\u003e (OS X) or \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eA\u003c/kbd\u003e (Windows).\n\n### Sublime: `.sublime-build` in the build system menu ([#73](https://github.com/daaain/Handlebars/issues/73))\n\n**Problem**: a useless and confusing item named `.sublime-build` is added to the build system menu. This is because the package internally uses a custom build configuration to be able to target both Atom and Sublime and this gets exposed. Though it's only needed for development, Sublime doesn't seem to offer an option to hide this as the package gets installed.\n\n**Solution**: delete the file from the package by running `zip -d Handlebars.sublime-package \".sublime-build\"` in the folder it's installed or by any other means.\n\n## Testing / contribution\n\nI've recently stopped heavily using Handlebars at my day job and became a father, so any contributions are more than welcome! I'm still using Github so will make sure to keep on being responsive on issues and pull requests.\n\nThere are some sample templates in `test/` folder. It's possible to see the different supported and yet to be implemented use cases there.\n\n### Sublime Text\n\nIf you want to work on the package you should install PackageDev either [from Github](https://github.com/SublimeText/PackageDev) or from Package Control. With that you can edit the JSON version (`grammars/Handlebars.json`) and let it export the Plist (`grammars/Handlebars.tmLanguage`) with the ST Build System.\n\nSublime Text does not use the [Plist format](http://manual.macromates.com/en/language_grammars) (`grammars/Handlebars.tmLanguage`); rather, it uses the Sublime-Syntax file (`grammars/Handlebars.sublime-syntax`). This file was originally generated with the `Plugin Development: Convert Syntax to .sublime-syntax` Sublime command, but it has since diverged in order to fix a Sublime Text specific bug ([#110](https://github.com/daaain/Handlebars/issues/110)). Ideally, the two versions will track each other, but Pull Requests which effect only one version are still appreciated.\n\nThe nicest development setup I found so far is to have the package installed via Package Control and then symlinking the development Git repo to `Sublime settings folder \u003e Packages`, which then overrides the installed one so you can toggle between them easily.\n\nAnother great trick I found out about recently is the `Show scope name` shortcut (\u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e (OS X) or \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eAlt\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e (Windows)) which will display the language scope on the status bar based on where your cursor is. If you're getting tired of pressing all these keys all the time, there are a few brilliant packages which do this automatically like the more subtle [ScopeAlways](https://sublime.wbond.net/packages/ScopeAlways) or the full on [ScopeHunter](https://sublime.wbond.net/packages/ScopeHunter) – note: both need to be activated via the Command Palette.\n\n## Precompilation\n\nThis package does not offer any Handlebars precompilation functionality to keep things simple, but you can use Ruby [Guard](https://github.com/guard/guard) (which is a file system watcher) and [Guard-Steering](https://github.com/guard/guard-steering) (a Handlebars precompiler from yours truly) to have all templates precompiled as you save them.\n\nThere's also a [Guard package for Sublime](https://github.com/cyphactor/sublime_guard) if you want integration, but I don't personally use this as I'm happy with Guard running in a terminal window I can access from anywhere.\n\nThere are of course Node.js / Grunt / Gulp based compilers too ([like this](https://npmjs.org/package/grunt-handlebars-js) and [this](https://www.npmjs.com/package/gulp-compile-handlebars)), but I haven't personally used any yet for precompilation.\n\n## Credits\n\nAdapted from the great [sublime-text-handlebars](https://github.com/nrw/sublime-text-handlebars) package by Nicholas Westlake.\n\nThanks a lot to all the [generous contributors](https://github.com/daaain/Handlebars/graphs/contributors)!\n\n## License\n\n(The MIT License)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaaain%2Fhandlebars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaaain%2Fhandlebars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaaain%2Fhandlebars/lists"}