{"id":15285348,"url":"https://github.com/sueddeutsche/handlebars-render-loader","last_synced_at":"2025-04-12T23:54:10.936Z","repository":{"id":57260571,"uuid":"83410632","full_name":"sueddeutsche/handlebars-render-loader","owner":"sueddeutsche","description":"Loads and compiles handlebars-files to html and returns it as a string","archived":false,"fork":false,"pushed_at":"2024-06-07T04:59:37.000Z","size":18,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T20:47:30.428Z","etag":null,"topics":["handlebars","html","loader","static","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sueddeutsche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-28T08:52:47.000Z","updated_at":"2021-01-24T12:45:23.000Z","dependencies_parsed_at":"2024-06-06T13:17:53.666Z","dependency_job_id":"0a682eab-ea73-43c4-b760-5fb2ac33abf1","html_url":"https://github.com/sueddeutsche/handlebars-render-loader","commit_stats":{"total_commits":13,"total_committers":3,"mean_commits":4.333333333333333,"dds":0.3076923076923077,"last_synced_commit":"94e6c5910b0f0ed3b6cde4fa8bdd13de161c4c9b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sueddeutsche%2Fhandlebars-render-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sueddeutsche%2Fhandlebars-render-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sueddeutsche%2Fhandlebars-render-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sueddeutsche%2Fhandlebars-render-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sueddeutsche","download_url":"https://codeload.github.com/sueddeutsche/handlebars-render-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248539742,"owners_count":21121226,"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":["handlebars","html","loader","static","webpack"],"created_at":"2024-09-30T15:04:17.103Z","updated_at":"2025-04-12T23:54:10.910Z","avatar_url":"https://github.com/sueddeutsche.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Handlebars Render Loader\n\n`npm install handlebars-render-loader --save-dev`\n\nLoads and compiles handlebars-files to html and returns it as a string. Additionally resolves and register all missing\npartials as a webpack-url (relative or absolute from a module). A missing partial must either be\n    \n- a relative path, starting with \"./\" or \"../\" or\n- an absolute path within a module, which has no starting \"/\". i.e. {{\u003e szig-frontend-toolkit/components/..}}\n\n\n## Usage\n\n\nin your webpack config add the loader i.e.\n\n```javascript\nvar HTMLExtractPlugin = new ExtractTextPlugin(\"html\", \"index.html\");\n\nvar webpackConfig = {\n\n    module: {\n        loaders: [\n            {\n                loader: `file-loader?name=[name].html!extract-loader!html-loader!handlebars-render-loader`,\n                test: /\\.hbs$/\n            }\n        ]\n    },\n\n    handlebarsRenderLoader: {\n\n        // debug registered partials\n        debug: false,\n\n        // data used to render hbs template\n        data: require(\"./data/project.json\"),\n\n        // partials are usually resolved via webpack.\n        // You may specify a map of partial aliases.\n        // This is usually necessary when you have dynamic partials.\n        partialAliases: {\n            \"partial-one\": require.resolve(\"path/to/partial-one\"),\n            \"partial-two\": require.resolve(\"path/to/partial-two\")\n        },\n\n        // register custom helpers with file globs\n        // The file name is used as helper id. The .helper postfix will be removed.\n        helpers: [\n            path.join(process.cwd(), \"app\", \"helpers\", \"*.helper.js\")\n        ],\n\n        // hooks\n        onBeforeCompile: function (Handlebars, templateContent) {},\n    }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsueddeutsche%2Fhandlebars-render-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsueddeutsche%2Fhandlebars-render-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsueddeutsche%2Fhandlebars-render-loader/lists"}