# strapi-hook-handlebars

> Handlebars hook for the Strapi framework

Latest version **1.0.1** (published 2019-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install strapi-hook-handlebars
pnpm add strapi-hook-handlebars
yarn add strapi-hook-handlebars
bun add strapi-hook-handlebars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-11-21 |
| First published | 2019-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 2 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shawn Dao |
| Maintainers | shawndaonois |
| Keywords | handlebars, hook, strapi |

## Links

- npm: https://www.npmjs.com/package/strapi-hook-handlebars
- Repository: https://github.com/newoceaninfosys/strapi-hook-handlebars
- Homepage: http://newoceaninfosys.com
- Issues: https://github.com/newoceaninfosys/strapi-hook-handlebars/issues
- npm.io page: https://npm.io/package/strapi-hook-handlebars

## Dependencies (2)

- [co](https://npm.io/package/co.md) ^4.6.0
- [@nois/koa-hbs](https://npm.io/package/@nois/koa-hbs.md) ^1.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-11-21
- 1.0.0 — 2019-11-21

## README

# strapi-hook-handlebars

[![npm version](https://img.shields.io/npm/v/strapi-hook-handlebars.svg)](https://www.npmjs.org/package/strapi-hook-handlebars)
[![npm downloads](https://img.shields.io/npm/dm/strapi-hook-handlebars.svg)](https://www.npmjs.org/package/strapi-hook-handlebars)

This built-in hook allows you to use the Handlebars template engine with custom options.

## Configuration

To configure your hook with custom options, you need to edit your `./config/hook.json` file in your Strapi app.

```javascript
{
  ...
  "handlebars": {
    "enabled": true
  }
}
```

More information in the Koa handlebars module https://github.com/newoceaninfosys/koa-hbs#options

## Usage

Insert code in your controller to render a view.

```javascript
module.exports = {
  home: async ctx => {
    return await ctx.render('home', {
      title: 'My app title',
    });
  },
};
```

This will render the `views/home.hbs` file and you will have access to `<%= title %>` data in your hbs file.

## Resources

- [MIT License](LICENSE.md)

---
_Source: https://npm.io/package/strapi-hook-handlebars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
