Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisdmacrae/front-matter-manipulator
A utility for parsing and manipulating documents with Front Matter
https://github.com/chrisdmacrae/front-matter-manipulator
cli front-matter node nodejs npm npm-package static-site static-site-generator
Last synced: about 2 months ago
JSON representation
A utility for parsing and manipulating documents with Front Matter
- Host: GitHub
- URL: https://github.com/chrisdmacrae/front-matter-manipulator
- Owner: chrisdmacrae
- Created: 2018-01-05T13:54:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T13:10:43.000Z (over 2 years ago)
- Last Synced: 2024-08-02T05:10:42.931Z (5 months ago)
- Topics: cli, front-matter, node, nodejs, npm, npm-package, static-site, static-site-generator
- Language: JavaScript
- Homepage: https://chrisdmacrae.github.io/front-matter-manipulator
- Size: 205 KB
- Stars: 24
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Front Matter Manipulator
> A utility for parsing and manipulating documents with Front Matter. Get the fields, values for any collection of documents. Bulk update, delete, or rename fields.## Getting Started
This utility can be used as a Command Line Interface, or as an import in your scripts.It has two primary uses:
- Parsing one or many files to discover the content model
- Updating the content model of one or many filesThis is done through the following commands:
- `fields`: finds all fields in specified files
- `values`: finds all values for specified fields in specified files
- `update`: update the value for specified field in specified files
- `rename`: update the name of specified field in specified files
- `drop`: delete the specified fields from the specified files
- `convert`: convert any field to an array## Installation
### Install CLI
Run the following command:
```
npm install -g front-matter-manipulator
```### Install in current directory for use in scripts
```
npm install front-matter-manipulator --save-dev
```## CLI (Command Line Interface)
Front Matter Manipulator can be used on the command line to perform operations on fields.See the documentation for each action:
- [Fields](https://chrisdmacrae.github.io/front-matter-manipulator/cli#fields)
- [Values](https://chrisdmacrae.github.io/front-matter-manipulator/cli#values)
- [Update](https://chrisdmacrae.github.io/front-matter-manipulator/cli#update)
- [Rename](https://chrisdmacrae.github.io/front-matter-manipulator/cli#rename)
- [Drop](https://chrisdmacrae.github.io/front-matter-manipulator/cli#drop)
- [Convert](https://chrisdmacrae.github.io/front-matter-manipulator/cli#convert)## Usage in node scripts/packages
Front Matter Manipulator can be used on in javascript files to perform advanced parsing or manipulation of fields.See the documentation for each action:
- [Fields](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#fields)
- [Values](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#values)
- [Update](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#update)
- [Rename](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#rename)
- [Drop](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#drop)
- [Convert](https://chrisdmacrae.github.io/front-matter-manipulator/scripts#convert)