{"id":15284295,"url":"https://github.com/alexy-os/bun-hbs","last_synced_at":"2026-01-24T01:37:55.327Z","repository":{"id":257804854,"uuid":"865033060","full_name":"alexy-os/bun-hbs","owner":"alexy-os","description":"Library for integrating Handlebars templates into BunJs","archived":false,"fork":false,"pushed_at":"2024-10-04T21:18:18.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T00:24:23.892Z","etag":null,"topics":["bun","bunjs","handlebars","handlebars-js","handlebarsjs","hbs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bun-hbs","language":null,"has_issues":false,"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/alexy-os.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":"2024-09-29T20:03:04.000Z","updated_at":"2024-12-05T14:00:37.000Z","dependencies_parsed_at":"2024-10-14T14:41:51.663Z","dependency_job_id":"e4064fc2-87e8-47e3-a17f-6f48ada6caea","html_url":"https://github.com/alexy-os/bun-hbs","commit_stats":null,"previous_names":["alexy-os/bun-hbs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fbun-hbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fbun-hbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fbun-hbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fbun-hbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexy-os","download_url":"https://codeload.github.com/alexy-os/bun-hbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804998,"owners_count":21806912,"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":["bun","bunjs","handlebars","handlebars-js","handlebarsjs","hbs"],"created_at":"2024-09-30T14:53:07.072Z","updated_at":"2026-01-24T01:37:55.271Z","avatar_url":"https://github.com/alexy-os.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# bun-hbs\n\nLibrary for integrating Handlebars templates into BunJs.\n\n## Installation\n\n```bash\nbun add bun-hbs\n```\n\n## Usage\n\n```typescript\nimport { setConfig, initHandlebars, render } from 'bun-hbs';\nimport { join } from 'path';\n\n// Configuring the configuration\nsetConfig({\n  VIEWS_DIR: join(__dirname, 'views'),\n  PARTIALS_DIR: join(__dirname, 'views/partials'),\n  LAYOUTS_DIR: join(__dirname, 'views/layouts'),\n  LOG_LEVEL: 'debug'\n});\n\n// Initializing the template engine\nawait initHandlebars();\n\n// Rendering a template\nconst result = await render('home.hbs', { title: 'Home' }, 'main.hbs');\nconsole.log(result);\n```\n\n## API\n\n- `setConfig(config: Partial\u003cConfig\u003e)`: Sets the engine configuration.\n- `initHandlebars()`: Initializes the template engine.\n- `render(template: string, context?: object, layout?: string)`: Renders a template with the specified context and layout.\n- `clearCache()`: Clears the template cache.\n- `registerHelper(name: string, helper: Function)`: Registers a custom helper.\n- `setCaching(enabled: boolean)`: Enables or disables caching.\n- `setCacheTTL(ttl: number)`: Sets the cache TTL.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fbun-hbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexy-os%2Fbun-hbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fbun-hbs/lists"}