express-markdown-static
v0.0.2
Published
An Express middleware function for serving static content while also rendering markdown
Downloads
1
Readme
Express Markdown Static
Serve static files while also rendering Markdown.
Installation
npm install express-markdown-static
To use
Register the exported markdownStatic
RequestHandler.
Parameters:
baseDir (string) - the base directory to serve static files from
options (object) - the options to pass to the middleware
options.extensions (string[]) - The extensions to be interpreted as markdown. Default:
['.md', 'markdown']
options.extensionsRequired (bool) - If false, than files without extensions are interpreted as Markdown. Default:
true
import markdownStatic from 'express-markdown-static'
app.get('/docs', markdownStatic('/documentation'))