1.1.0 • Published 5 months ago

markexpress v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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.

1.1.0

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago