GitXplorerGitXplorer
D

create-gatsby-blog-post

public
34 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
ddee129520b94619a4f1d58893f9e843fd01683b

chore: prep for 1.0.0

DDSchau committed 8 years ago
Unverified
6b55659c204aae28ca0318dedb4b61a4a66d6fe1

chore: actually copy files

DDSchau committed 8 years ago
Unverified
f1ee1ec0ad060f3226c2e812fa5643e9dcb22928

build: fixing minor issues exposed when publishing

DDSchau committed 8 years ago
Unverified
9ea3ef5a2c1492c220f0db50e186cf9b747ca496

chore: tweak version

DDSchau committed 8 years ago
Unverified
cd7d087870afdc655c47153bb365c890a54a7a78

build: remove gitDir

DDSchau committed 8 years ago
Unverified
07c6913a15678671d300d92730db0c911e945790

chore: update tests

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