Skip to content

Easily create metadata for your markdown files

License

Notifications You must be signed in to change notification settings

atsixian/postie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postie

A handy tool to create metadata for your markdown blog posts.

Demo

Why the name

It sounds cute.

Installation

Global

yarn global add @deerhound/postie OR

npm install -g @deerhound/postie

Then you can run postie in your command line.

Local

yarn add @deerhound/postie OR

npm install @deerhound/postie

Run with

yarn postie OR

npx postie

Usage

postie

Options:
  --template, -t  Create file with a specific template
  --path, -p      Output directory for markdown files
  --help, -h      Show help

NOTE Make sure the template used in postie -t [TEMPLATE] exists. You can use postie template -l to list all templates.

postie template

Create a new template

Options:
  --list, -l  List all templates
  --import, -i  Create template from a javascript file
  --help, -h  Show help
postie config

Open the configuration file

Options:
  --path, -p   Default output path for markdown files created
  --list, -l   List all configs
  --clear, -c  Clear all configs
  --help, -h   Show help

Create Template

Create a simple template with postie new template

create-templae

Format of the template file

Postie asks questions with the help of Inquirer.js . And the template for your metadata is generated from your questions. For example, based on questions below, Postie will prompt you to fill in title and excerpt.

const questions = [
  {
    name: "title",
    type: "input",
    message: "title: "
  },
  {
    name: "excerpt",
    type: "input",
    message: "excerpt: "
  }
];

example

output

After you run postie template, Postie will open the editor, and you should create a question array following the format above.

More complicated

Check out the example. You can write your own file and import it with postie template -i /path/to/your/file.

For all possible prompt types, please see doc for Inquirer.js.

About

Easily create metadata for your markdown files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published