GitXplorerGitXplorer
D

create-gatsby-blog-post

public
34 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
502725c403d152bb71096fc03b61c719d32d39e9

chore: remove .html suffix from blog posts

DDSchau committed 8 years ago
Unverified
be83b18146d933ece7e117f775bbbad1281be296

fix: use correct frontmatter template

DDSchau committed 8 years ago
Unverified
c419c316a1d5e1dcb20fcf4057cc87ff0ddc3745

test: ignore built files

DDSchau committed 8 years ago
Unverified
0d04f09caac0b5263d8942d841419087e8b481ca

chore: minor fixes

DDSchau committed 8 years ago
Unverified
37a89acb294211557da4ff0cc416f98fb943895e

test: use await when possible

DDSchau committed 8 years ago
Unverified
18273ef4301763ae8f719e264610f376ef2d475f

test: remove unnecessary manual mocks

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