# metalsmith-merger

> Metalsmith plugin which merges files.

Latest version **1.0.1** (published 2018-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install metalsmith-merger
pnpm add metalsmith-merger
yarn add metalsmith-merger
bun add metalsmith-merger
```

## 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 | 2018-03-09 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dan Grahn |
| Maintainers | dgrahn |
| Keywords | metalsmith, merge |

## Links

- npm: https://www.npmjs.com/package/metalsmith-merger
- Repository: https://github.com/dgrahn/metalsmith-merger
- Homepage: https://github.com/dgrahn/metalsmith-merger#readme
- Issues: https://github.com/dgrahn/metalsmith-merger/issues
- npm.io page: https://npm.io/package/metalsmith-merger

## Dependencies (1)

- [metalsmith-plugin-kit](https://npm.io/package/metalsmith-plugin-kit.md) ^1.0.1

## Recent versions

- 1.0.1 (latest) — 2018-03-09
- 1.0.0 — 2018-03-06

## README

metalsmith-merger
=========

A [Metalsmith](https://github.com/segmentio/metalsmith) plugin that merges files.

This is useful when you want a single-page version of your site. I created this
to package a documentation website into a single, printable page.

## Installation

    $ npm install metalsmith-merger

## Usage
Include `metalsmith-merger` in your metalsmith pipeline.

`metalsmith-merger` can be used without options:

```js
var merger = require('metalsmith-merger');

metalsmith.use(merger());
```

## Options
By passing in certain properties, you can change the behavior.

| Name          | Type                 | Default            |
| ------------- | -------------------- | ------------------ |
| `metadata`    | `object`             | `{}`               |
| `pattern`     | `regex`              | `*.html`           |
| `exclude`     | `array`              | `[]`               |
| `file`        | `string`             | `index-all.html`   |
| `header`      | `fn(filename, file)` | `<h1>{title}</h1>` |
| `content`     | `fn(filename, file)` | `{contents}`       |

### `metadata`
A set of metadata which will be added to the merged file.

### `pattern`
The files to include in the merge.

### `exclude`
An array of files to exclude from the merge.

### `file`
The destination for the merged file.

### `header`
A function which controls the display of the header in-between files.

### `content`
A function which control the display of the content of the files.

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