@abysser/matter-lint
v1.2.8
Published
A front-matter normalizer that depends on the commit history
Downloads
33
Readme
matter-lint
A front-matter normalizer that depends on the commit history
Quik Start
Install:
npm install @abysser/matter-lint
Usage
npx matter-lint -- <filePath1> <filePath2> ...
Options
As the Command Args
Specify a configuration file (It must be a JSON file, default: .matterlint.json):
npx matter-lint -c xxx.json -- <filePath1> <filePath2> ...
Specify the number of blank lines between front-matter and content:
npx matter-lint -bl <number> -- <filePath1> <filePath2> ...
Forced to cover:
npx matter-lint -f -- <filePath1> <filePath2> ...
Write back:
npx matter-lint -w -- <filePath1> <filePath2> ...
Field Mapping:
npx matter-lint -m author:writer;contributors:writers;updatedby:last_revisor;created:date -- <filePath1> <filePath2> ...
From the Configuration File
.matterlint.json:
{
"blankLines": 1,
"force": false,
"write": false,
"map": {
"author": "writer",
"contributors": "writers",
"updatedby": "last_revisor",
"created": "date",
}
}
License
Copyright 2022 Abyssers