https://github.com/learosema/frontm8er
Tool to quickly add some frontmatter to your markdown files
https://github.com/learosema/frontm8er
Last synced: 4 months ago
JSON representation
Tool to quickly add some frontmatter to your markdown files
- Host: GitHub
- URL: https://github.com/learosema/frontm8er
- Owner: learosema
- License: mit
- Created: 2020-12-09T21:25:06.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-01-16T14:10:40.000Z (5 months ago)
- Last Synced: 2026-01-17T04:31:24.500Z (5 months ago)
- Language: TypeScript
- Size: 168 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# frontm8er
Quick and dirty tool to add data to your markdown files.
## CLI Usage
```sh
npm i frontm8er -g
# Display help
frontm8er --help
# Adds author field for every markdown file
frontm8er --author="Lea Rosema" content/*.md
# Adds created and modified time and author field for every markdown file
frontm8er -c -m --author="Lea Rosema" content/*.md
# Pulls data from json file and adds it to the markdown file
frontm8er data.json content/*.md
# Watch mode: watch content folder, write to output folder add author and additional data.yaml to files
frontm8er -i content -o output './**/*.md' data/data.yaml --author="Lea Rosema" --watch
```
## Supported data formats
Supported data formats are yaml, JSON and [json5](https://json5.org/)
## API Usage
```sh
import { processFrontmatterFiles } from 'frontm8er';
await processFrontmatterFiles({
inputFilePatterns: ['content/*.md'],
dataFilePatterns: ['content/data.json'],
data: {
author: 'Lea Rosema'
}
});
```
## Running the CLI while in development mode
```sh
node -r esm -r ts-node/register src/cli --help
```