{"id":16057544,"url":"https://github.com/aduth/handlebars-helper-filehash","last_synced_at":"2025-03-16T06:27:13.144Z","repository":{"id":13170257,"uuid":"15853305","full_name":"aduth/handlebars-helper-filehash","owner":"aduth","description":"{{ fileHash }} Handlebars helper for generating an md5 hash from a file's content","archived":false,"fork":false,"pushed_at":"2014-01-14T02:03:17.000Z","size":128,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T22:35:06.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/aduth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-12T23:32:07.000Z","updated_at":"2014-01-14T02:03:18.000Z","dependencies_parsed_at":"2022-09-15T21:02:41.515Z","dependency_job_id":null,"html_url":"https://github.com/aduth/handlebars-helper-filehash","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fhandlebars-helper-filehash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fhandlebars-helper-filehash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fhandlebars-helper-filehash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fhandlebars-helper-filehash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aduth","download_url":"https://codeload.github.com/aduth/handlebars-helper-filehash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835952,"owners_count":20355611,"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":[],"created_at":"2024-10-09T03:03:24.195Z","updated_at":"2025-03-16T06:27:13.123Z","avatar_url":"https://github.com/aduth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# {{ fileHash }}\n\nThe {{ fileHash }} Handlebars helper generates an md5 hash from a specified file's content. Perfect for automatically cache-busting modified assets (e.g. stylesheets).\n\n## Quickstart\n\nIn the root of your project, run the following in the command line:\n\n```bash\nnpm install handlebars-helper-filehash --save-dev\n```\n\n### Assemble Usage\n\nIf you use [Assemble](http://assemble.io) and Grunt, add `handlebars-helper-filehash` to the `helpers` property in your Gruntfile's [Assemble](http://assemble.io) task or target options:\n\n```javascript\ngrunt.initConfig({\n  assemble: {\n    options: {\n      // the 'handlebars-helper-filehash' module must also be listed in\n      // devDependencies for assemble to automatically resolve the helper\n      helpers: ['handlebars-helper-filehash', 'foo/*.js']\n    }\n    ...\n  }\n});\n```\n\nYou can now use begin using the helper in your templates. To use the helper, pass a file path and optionally include a number as a second parameter if you wish to limit the output to a set length.\n\n__Template__:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/assets/css/main.css?{{ fileHash './public/assets/css/main.css' 10 }}\"\u003e\n```\n\n__Output__:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/assets/css/main.css?e5b5b3e0fc\"\u003e\n```\n\n## License and Copyright\n\nCopyright (c) 2014 Andrew Duthie\n\nReleased freely under the MIT License (refer to LICENSE.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fhandlebars-helper-filehash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faduth%2Fhandlebars-helper-filehash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fhandlebars-helper-filehash/lists"}