A front-matter normalizer that depends on the commit history
Install:
npm install @abysser/matter-lint
npx matter-lint -- <filePath1> <filePath2> ...
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> ...
.matterlint.json:
{
"blankLines": 1,
"force": false,
"write": false,
"map": {
"author": "writer",
"contributors": "writers",
"updatedby": "last_revisor",
"created": "date",
}
}
Copyright 2022 Abyssers