🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

frontm8er

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frontm8er

A tool to add frontmatter to markdown files

latest
Source
npmnpm
Version
3.1.2
Version published
Maintainers
1
Created
Source

frontm8er

Quick and dirty tool to add data to your markdown files.

CLI Usage

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

API Usage

import { processFrontmatterFiles } from 'frontm8er';

await processFrontmatterFiles({
  inputFilePatterns: ['content/*.md'],
  dataFilePatterns: ['content/data.json'],
  data: {
    author: 'Lea Rosema'
  }
});

Running the CLI while in development mode

node -r esm -r ts-node/register src/cli --help

Keywords

batch-processing

FAQs

Package last updated on 25 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts