Skip to content

stendahls/markpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MarkPage

Throw in markdown, get a self-contained HTML file in return.

Install

$ npm install @stendahls/markpage

Usage

const markpage = require( '@stendahls/markpage' );

const markdown = fs.readFileSync( './readme.md', 'utf8' );
const html = markpage( markdown, 'MyTitle' );

And then with something like express

app.get( '/', ( request, response ) => {
    response.send( html );
} );

API

Returns a full HTML page with styling as a string.

markpage( markdownString, [ options ] );

title

Type: string
Default: 'Index'

minify

Minify the CSS & JS
Type: Boolean
Default: true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published