markexpress
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

markespress

A Simple markdown file server middleware for express

Usage:

import { markdown } from "markexpress";
app.use("/", markdown("./{markdown_folder_to_be_served}"));
app.use("/", markdown("./{markdown_folder_to_be_served}", {
  strip: true, // Strip .md from url (default {true})
  fallback: true // Fallback to other middleware in case of error (default {true})
}));

The title of the page will be autogenerated by the first header level 1 fount in the page, but you can add a front matter in yaml to your markdown files to specify some extra attributes to the generated page.

---
title: Title of the page
css: /path/to/file.css
favicon: /path/to/image
---

Lorem ipsum dolor sit amet.

Type definitions are available.

Package Sidebar

Install

npm i markexpress

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

12.8 kB

Total Files

17

Last publish

Collaborators

  • henriquekirchheck