papers-we-love/papers-we-love.github.io — pull request #18 by DarrenN (2014-12-07 18:18:52+00:00)
Title: Add chapters to chapters.yml via CLI

## Description

Can now use middleman's CLI commands to add a chapter to `chapters.yml`, which will in turn generate links on the site.

### Usage

```bash
$ middleman chapter NAME
```

`NAME` should be the lowercase name of the chapter

**Options:**

Option | Alias | Description
---------|---------|-----------------
title | -t | The title of the chapter _optional_
description | -d | The description of the chapter (for meta tags) _optional_
url | -u | The url of the chapter page _optional_

**Example:**

```bash
$ bundle exec middleman chapter washington-dc -t "Washington, DC" -u "/chapters/washington-dc"
```

Appends the following YAML to `chapter.yml`:

```yaml
- :name: washington-dc
:title: Washington, DC
:description: The Washington, DC chapter of Papers We Love
:url: "/chapters/washington-dc"
```

_Note_: this will throw an error if the chapter already exists, bust open your editor to make changes to existing chapters.