https://github.com/tinovyatkin/require-markdown
Loads Markdown files as compiled HTML string synchronously (as Node require)
https://github.com/tinovyatkin/require-markdown
markdown markdown-it markdown-to-html nodejs
Last synced: 4 months ago
JSON representation
Loads Markdown files as compiled HTML string synchronously (as Node require)
- Host: GitHub
- URL: https://github.com/tinovyatkin/require-markdown
- Owner: tinovyatkin
- License: mit
- Created: 2018-04-21T16:15:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T00:14:10.000Z (over 2 years ago)
- Last Synced: 2025-02-10T09:19:25.793Z (5 months ago)
- Topics: markdown, markdown-it, markdown-to-html, nodejs
- Language: JavaScript
- Size: 319 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/markdown-it/markdown-it) for rendering with emoji, subscript, superscript, comments stripping and abbr plugins enabled.
## Usage
```js
const requireMarkdown = require("require-markdown")(
(markdownItOptions = { typographer: true })
);const htmlString = requireMarkdown("../README.md"); // => '
require-markdown
' ....
```