require-markdown

    1.2.0 • Public • Published

    require-markdown

    Loads Markdown files as compiled HTML string synchronously (as Node require)

    Motivation

    This module suppose to be used in build systems, etc, where you prefer to store texts as Markdown files. Uses markdown-it for rendering with emoji, subscript, superscript, comments stripping and abbr plugins enabled.

    Usage

    const requireMarkdown = require("require-markdown")(
      (markdownItOptions = { typographer: true })
    );
     
    const htmlString = requireMarkdown("../README.md"); // => '<h1>require-markdown</h1>' ....

    Install

    npm i require-markdown

    DownloadsWeekly Downloads

    12

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    3.99 kB

    Total Files

    4

    Last publish

    Collaborators

    • tinovyatkin