GitXplorerGitXplorer
D

create-gatsby-blog-post

public
34 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
a5f54a7fbe16fafa734e07d56efe74a16fe96e40

fix: swap back to previous date JSON behavior; keep tests deterministic

DDSchau committed 8 years ago
Unverified
5b3426db50829e908a624352f776638ff58cdc8c

chore: update notification settings

DDSchau committed 8 years ago
Unverified
cc6662f912870f4de3312f1bb06570673109b565

chore: bump version

DDSchau committed 8 years ago
Unverified
ca3663a719ad325dc34ce06ed8877f5eff6a19e1

test: make date deterministic

DDSchau committed 8 years ago
Unverified
2934bc9b3a611cc3f521f41e07372482541fa364

test: hopefully fix CI tests failing with date

DDSchau committed 8 years ago
Unverified
4ac62ec175445c301335c631ebca9e6b90f066a3

chore: add travis badge

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