<commit_before># metalsmith-hyphenate [![Build Status](https://travis-ci.org/saneef/metalsmith-hyphenate.svg?branch=master)](https://travis-ci.org/saneef/metalsmith-hyphenate)

A Metalsmith plugin to hyphenate words. It’s based on [Bramstein’s](https://github.com/bramstein) [Hyper hyphenation engine](https://github.com/bramstein/Hypher)

## Installation

```
$ npm install metalsmith-hyphenate
```

## Usage

### CLI

Install via npm and then add the metalsmith-hyphenate key to your metalsmith.json plugins:

```
{
  "plugins": {
    "metalsmith-hyphenate": {
      "elements": ["p", "blockquote"]
    }
  }
}
```

### JavaScript
Pass options to the hyphenate plugin and pass it to Metalsmith with the use method:

```
var hyphenate = require('metalsmith-hyphenate');

metalsmith.use(hyphenate({
  "elements": ["p", "blockquote"],
  "langModule": "hyphenation.de"
}));
```

### Options

- `elements` - HTML elements which will be hyphenated. Default is `['p', 'a', 'li', 'ol']`
- `langModule` - [Hyper](https://github.com/bramstein/Hypher#nodejs) [language pattern](https://github.com/bramstein/hyphenation-patterns) to use. You need to install the language module separately. Default is `'hyphenation.en-us'`<commit_msg>Updating README<commit_after># metalsmith-hyphenate [![Build Status](https://travis-ci.org/saneef/metalsmith-hyphenate.svg?branch=master)](https://travis-ci.org/saneef/metalsmith-hyphenate)

A Metalsmith plugin to hyphenate words. It’s based on [Bramstein’s](https://github.com/bramstein) [Hyper hyphenation engine](https://github.com/bramstein/Hypher)

## Installation

```
$ npm install metalsmith-hyphenate
```

## Usage

### CLI

Install via npm and then add the metalsmith-hyphenate key to your metalsmith.json plugins:

```JSON
{
  "plugins": {
    "metalsmith-hyphenate": {
      "elements": ["p", "blockquote"]
    }
  }
}
```

### JavaScript
Pass options to the hyphenate plugin and pass it to Metalsmith with the use method:

```JavaScript
var hyphenate = require('metalsmith-hyphenate');

metalsmith.use(hyphenate({
  "elements": ["p", "blockquote"],
  "langModule": "hyphenation.de",
  "ignore": ["archives/*"] // All the files inside 'archive' will not be hyphenated
}));
```

### Options

- `elements` - (Array) HTML elements which will be hyphenated. Default is `['p', 'a', 'li', 'ol']`
- `langModule` - (String) [Hyper](https://github.com/bramstein/Hypher#nodejs) [language rules](https://github.com/bramstein/hyphenation-patterns) to be used for hyphenation. Default is `'hyphenation.en-us'`. You need to install manually — `npm install <language-module>` – if you are going to use any language rule other than the default.
- `ignore` - (Array | String) You can use glob patterns to ignore some files.
{'fraction_non_alphanumeric': 0.15900802334062727, 'fraction_numerical': 0.0, 'mean_word_length': 4.799154334038055, 'pattern_counts': {'":': 11, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1929728', 'n_tokens_mistral': 995, 'n_tokens_neox': 913, 'n_words': 239}