Giter VIP home page Giter VIP logo

blog-cli's Introduction

blog-cli

A cli to create blog posts for static site generators.

This is a useful little helper if you have a Jekyll, Hugo or any other static site generator blog that consumes Markdown files with Front Matter.

Once you configure it with the path to your Markdown files and your favorite Markdown editor it will create Markdown files for you blog posts in that directory with the following Front Matter:

---
draft: true
date: 2019-01-17T09:34:49.212Z
title: ""
---

If you are publishing your blog by pushing to a remote Git repository you can use the --publish flag to publish your blog. It will add all unstaged files, commit them with the message new post and push to origin master.

Install

This isn't in the registry, so you can just clone or download it and install it manually.

$ git clone https://github.com/jackbaty/blog-cli
$ cd blog-cli/
$ npm install --global

Usage

Usage
	$ blog [slug]

Options
	--help
	--path  ~/path/to/posts [Default: .]
	--editor 'visual studio code' [Default: 'ia writer']
	--publish [Default: true]

Examples
	$ blog --path ~/my-blog/posts
	Saved the path `~/my-blog/posts` for your blog posts

	$ blog --editor '	visual studio code'
	Saved visual studio code as your editor

	$ blog my-cool-post
	Created your new post at
	/Users/username/my-blog/posts/2019-01-17-my-cool-post.md
	and openening it in your editor

	$ blog --publish
	Your changes have been pushed

License

MIT © Kahlil Lechelt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.