# @dschau/create-gatsby-blog-post

> A utility to create a gatsby blog post

Latest version **1.1.0** (published 2017-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dschau/create-gatsby-blog-post
pnpm add @dschau/create-gatsby-blog-post
yarn add @dschau/create-gatsby-blog-post
bun add @dschau/create-gatsby-blog-post
```

Provides the command `create-post`.

## 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.1.0 |
| Published | 2017-07-18 |
| First published | 2017-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34 |
| Maintainers | dschau |

## Links

- npm: https://www.npmjs.com/package/@dschau/create-gatsby-blog-post
- Repository: https://github.com/dschau/create-gatsby-blog-post
- Homepage: https://github.com/dschau/create-gatsby-blog-post#readme
- Issues: https://github.com/dschau/create-gatsby-blog-post/issues
- npm.io page: https://npm.io/package/@dschau/create-gatsby-blog-post

## Dependencies (8)

- [mz](https://npm.io/package/mz.md) ~2.6.0
- [yargs](https://npm.io/package/yargs.md) ~8.0.2
- [globby](https://npm.io/package/globby.md) ~6.1.0
- [date-fns](https://npm.io/package/date-fns.md) ~1.28.5
- [mz-modules](https://npm.io/package/mz-modules.md) ~1.0.0
- [gray-matter](https://npm.io/package/gray-matter.md) ~3.0.2
- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ~4.1.1
- [lodash.capitalize](https://npm.io/package/lodash.capitalize.md) ~4.2.1

## Recent versions

- 1.1.0 (latest) — 2017-07-18
- 1.0.2 — 2017-07-17
- 1.0.1 — 2017-07-17
- 1.0.0 — 2017-07-17
- 1.0.0-rc.1 — 2017-07-17
- 1.0.0-rc.0 — 2017-07-17

## README

# `create-gatsby-blog-post`

[![Build Status](https://travis-ci.org/DSchau/create-gatsby-blog-post.svg?branch=master)](https://travis-ci.org/DSchau/create-gatsby-blog-post)

A utility and CLI to scaffold out a blog post that follows the gatsby `pages/` format, including a MD file with some default frontmatter (data) set up.

## Set up

`yarn add @dschau/create-gatsby-blog-post --dev`

or for global usage

`yarn global add @dschau/create-gatsby-blog-post`

## Usage

### `createPost(post: string, [options])`

```javascript
const { createPost } = require('create-gatsby-blog-post');

createPost('hello-world'); // will create the folder `src/pages/YYYY-MM-DD-hello-world` with `index.md` inside
```

#### Options

|Name|Description|Default|
|:--:|-----------|:-----:|
|`date`|Pass in a custom date object to use as the "now" value|`+new Date()`|
|`dateFormat`|Format the date according to a [date-fns format string](https://date-fns.org/docs/format)|`YYYY-MM-DD`|
|`root`|Root directory to use to place the blog post/markdown file|`src/pages`|
|`tags`|Whether to place frontmatter "tags" key in each post|`true`|

### CLI

```bash
create-post -- --date-format "YYYY-MMM-DD" hello-world
```

---
_Source: https://npm.io/package/@dschau/create-gatsby-blog-post · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
