0.1.0 • Published 2 years ago

metadown v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Metadown

NPM version

A simple package that helps parse metadata from markdown files. Currenlty supports only node.js environments since it uses filesystem.

Install with npm

npm install metadown --save

Example usage

./path-to/markdown.md

---
title: Metadown
description: helps manage metadata in .md files
date: 03.06.2021
---

# This is a heading

Aww yeaaa

Javascript:

import metadown from "metadown";

const parsed = await metadown("./path-to/markdown.md")

// parsed:
{
  metadata: {
    title: "Metadown",
    description: "helps manage metadata in .md files",
    date: "03.06.2021",
  },
  title: "This is a heading",
  content: ...
}

This is the interface for the parsed object

interface IParsedMarkdown {
  metadata?: { [key: string]: string };
  title?: string;
  content: string;
}
  • metadata is the key value pairs of the top part
  • title is the biggest title of the markdown content
  • content is the actual markdown
0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago