markdown-folder-api

0.1.1 • Public • Published

Markdown Folder API

Takes a folder path as an imput, and parses the markdown files inside. The parsed files are stored and can be retreived with an API.

Install

# NPM 
npm i markdown-folder-api 
 
# Yarn 
yarn add markdown-folder-api

Usage

let mdFiles = new MarkdownFolder({
  path: '/folder/path'
});
 
mdFiles.on('load', () => {
  // Get all files
  let allFiles = mdFiles.getAll();
  // Get single file
  let someFile = mdFile.get('fileName');
  // Get single file in a subfolder
  let anotherFile = mdFile.get('folderName/fileName');
});
 

Options

new MarkdownFolder({
  // Absolute folder path (String)
  path: '/folder/path'
  // Switch to enable / disable slugifying the folder / filename (Boolean) 
  // Default: false
  slugify: true
});
 

Disclaimer

This software is currently BETA quality, use at your own risk

Readme

Keywords

Package Sidebar

Install

npm i markdown-folder-api

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jellekralt