# handlebars-extend-block

> add extend blocks to handlebars

Latest version **1.0.0** (published 2014-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install handlebars-extend-block
pnpm add handlebars-extend-block
yarn add handlebars-extend-block
bun add handlebars-extend-block
```

## 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.0 |
| Published | 2014-12-12 |
| First published | 2014-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Roman Shtylman |
| Maintainers | shtylman |
| Keywords | handlebars, extend, block |

## Links

- npm: https://www.npmjs.com/package/handlebars-extend-block
- Repository: https://github.com/defunctzombie/handlebars-extend-block
- Issues: https://github.com/defunctzombie/handlebars-extend-block/issues
- npm.io page: https://npm.io/package/handlebars-extend-block

## Recent versions

- 1.0.0 (latest) — 2014-12-12

## README

# handlebars-extend-block

Create extend blocks for handlebars allowing partials to inject text into parent elements. This is generally useful for script and style tags.

## example

```js
var handlebars = require('handlebars');
var extend = require('handlebars-extend-block');

handlebars = extend(handlebars);
```

Layout File
```html
<head>
    <title>{{title}}</title>
    <link rel='stylesheet' href='/css/style.css'>
    {{{block "stylesheets"}}}
</head>

<body>
    {{{body}}}

    <hr/>
    post body
    <hr/>

    {{{block "scripts"}}}
</body>
```

Partial
```html
{{#extend "stylesheets"}}
<link rel="stylesheet" href="/css/index.css"/>
{{/extend}}

let the magic begin

{{#extend "scripts"}}
<script>
document.write('foo bar!');
</script>
{{/extend}}
```

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