Markdowndb

screenshot of Markdowndb

Turn markdown files into structured, queryable data with JS. Build markdown-powered docs, blogs, and sites quickly and reliably.

Overview

MarkdownDB is a javascript library that enables the transformation of markdown files into a structured and queryable database. It facilitates the creation of markdown-powered websites efficiently and reliably. The library offers various features such as parsing markdown files to extract structured data, building a queryable index in JSON files or SQLite database, and providing a lightweight javascript API for querying and using the data files in applications.

Features

  • Index a folder of files: Create a database index by analyzing a folder containing markdown and other files.
  • Command line tool for indexing: Use the command line tool to generate a markdowndb (index) easily.
  • SQL(ite) index: Provides support for SQL(ite) indexing in version 0.2.
  • JSON index: Supports indexing in JSON format starting from version 0.6.
  • Index multiple folders: Planned feature that will allow indexing of multiple folders with configurable options.
  • Configuration for Including/Excluding Files: Customize the inclusion or exclusion of specific files from the indexing process.
  • Extract structured data:
    • Frontmatter metadata: Extract metadata from markdown frontmatter and include it in a metadata field.
    • Deal with casting types: Enable type casting for data stored in the database, allowing for useful queries based on casting types.
    • Tags: Extract tags from markdown pages and frontmatter for organized categorization.
    • Links: Identify links between files, including standard links and wikilinks. This enables computations such as backlinks and deadlinks.
    • Tasks: Extract tasks from markdown files, providing a view similar to Obsidian task management.

Summary

MarkdownDB is a powerful javascript library that simplifies the creation of markdown-powered websites by converting markdown files into a structured and queryable database. It offers features such as indexing folders of files, extracting structured data, and providing an intuitive API for querying the database. By supporting different index formats and incorporating features like metadata extraction, type casting, tags, and link analysis, MarkdownDB enhances the usability and efficiency of markdown-driven sites.

contentlayer
Contentlayer

Contentlayer is an open-source platform for building dynamic, data-driven websites and applications using markdown files as the content source. It features an intuitive API, flexible content modeling, and easy integration with popular frontend frameworks and tools.