1.1.0 • Published 1 year ago

markdown-creator v1.1.0

Weekly downloads
100
License
MIT
Repository
github
Last release
1 year ago

markdown-creator

Create markdown file via command line.

Usage

mdc create -t sample/template.md -n new-file -o sample --vars 2022-01-01,"John Doe"

e.g.) sample/template.md

---
title: Post at {$1}
author: {$2}
---

## {$1}'s news
- Lorem ipsum1
- Lorem ipsum2

Options

You can also see the each options with mdc create --help.

-t, --template

Use specified file as template.

-n, --name

Use specified name as file's name.

-o, --out

Use specified path as directory where file create.

--vars

Use variables which are used for format. You can pass variables with commma connected, which are used to format the string {$1}, {$2}, ...

--today

Replace the characters {$today} with today's date using passed the day.js format.

For example, if you have below template markdown file,

---
title: Lorem ipsum
publishedAt: {$today}
---

## The news of {$today}

and run the mdc create -n my-post --today YYYY-MM-DD on Jun 1st, 2023.

After that, following my-post.md file may be generated.

---
title: Lorem ipsum
publishedAt: 2023-01-01
---

## The news of 2023-01-01
1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago