Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.
/ matter-lint Public archive

A front-matter normalizer that depends on the commit history

License

Notifications You must be signed in to change notification settings

Abyssers/matter-lint

Repository files navigation

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

MIT

Copyright 2022 Abyssers

About

A front-matter normalizer that depends on the commit history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published