0.0.10 • Published 5 years ago

frontmatter-markdown-to-json v0.0.10

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

frontmatter-markdown-to-json

Converts a frontmatter markdown collection of files into one or several json files, each having an array with the front matter data and the body (parsed as HTML) of each file.

Structure of the input folders

Folder structure must be:

input_folder
|___ folder_with_name_of_json //e.g. the folder named "blog" will produce "blog.json"
|	|___ whatever_other_folders//they will not alter the form of the output
|		|___  file.md
|
|___ folder2_with_name_of_json
	|___ whatever_other_folders
		|___  file.md

The output jsons will be an array of objects corresponding to each file. Each objects has an attributes property holding the frontmatter and a body property holding the parse body as HTML of the markdown.

Installation

npm i frontmatter-markdown-to-json -S

CLI usage

Specify input folder with the option --in=<path> (defaults to './content') and the output folder with the option --out=<path> (defaults to ./)

node node_modules/frontmatter-markdown-to-json --in=my-content --out=my-data

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago