GitXplorerGitXplorer
D

create-gatsby-blog-post

public
34 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
7fba6b0a194ba7d26c010eb0e82bed2b3efab317

chore: add travis yml file

DDSchau committed 8 years ago
Unverified
3ebd1d4fdfc669f52558e9d90014aa625b9b2a0f

refactor: change default date format to year first, fix tests

DDSchau committed 8 years ago
Unverified
7990107d638ca182a0581379327e05208eeac511

chore: fix typo

DDSchau committed 8 years ago
Unverified
a2150729be0c1744e86033f67c20630b1417d3eb

chore: bump version

DDSchau committed 8 years ago
Unverified
ce6db589ca4e9dbc64acde5bf40067b60463c680

chore: update readme

DDSchau committed 8 years ago
Unverified
e6da935c254ee8a5d34bca0f1dbd8f06e4870df1

chore: copy README.md as part of build process

DDSchau committed 8 years ago

README

The README file for this repository.

create-gatsby-blog-post

Build Status

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])

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 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

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