https://github.com/instance-id/json-to-frontmatter-yaml
A small json to frontmatter yaml script using the grey-matter library
https://github.com/instance-id/json-to-frontmatter-yaml
Last synced: 6 months ago
JSON representation
A small json to frontmatter yaml script using the grey-matter library
- Host: GitHub
- URL: https://github.com/instance-id/json-to-frontmatter-yaml
- Owner: instance-id
- License: mit
- Created: 2020-04-17T21:14:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T21:41:21.000Z (over 5 years ago)
- Last Synced: 2025-05-12T03:13:23.554Z (6 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-to-frontmatter-yaml
A small json to frontmatter yaml script using the grey-matter library (Used with the Hugo static website generator, but if you want to use it for other purposes, I am sure you can)
Use by adjusting the config section at the top of the script
### Prerequisites
- node & npm
- grey-matter
### Installing & Running
- Run `npm install` to install dependencies
- Run `node convert.js` to convert files
#### Commands
There is 1 available command:
- `node convert.js` (Converts the file and creates a second index file named index.md.md that you can rename yourself)
- `node convert.js replace` (Replace original index.md with new and rename original as index_old.md .)
Flags:
- `-c FILE.json` or `--configFile FILE.json` flag to override default config (check config-example.json)