The @nitonodev/aeromd plugin for generate html pages
See changes at CHANGELOG.md
This package contains a built-in declaration for TypeScript, therefore you do not need to install types for this package separately.
npm i @nitonodev/aeromd-html
// if you use a commonjs
const { GenerateHTMLPage } = require('@nitonodev/aeromd-html');
// if you use a esm
import { GenerateHTMLPage } from '@nitonodev/aeromd-html';
To create a class you may to write next lines of code
// Instead of mp your variable name
// Instead of '# Hello' your markdown code
const mp = new GenerateHTMLPage('# Hello');
This function generate a md-theme.css file in you directory which contains my custom styles for parsed markdown
name of function | return value | params |
---|---|---|
generateStyles | create a md-theme.css | no params |
Examples:
const mp = new GenerateHTMLPage('# Hello');
mp.generateStyles(); // create md-theme.css and return CSS styles as string
This function contains all function declared at class GenerateHTMLPage and parse markdown, generate styles and write html page for parsed markdown
name of function | return value | params |
---|---|---|
generateHTMLPage | return HTML page, create a md-theme.css, md.html and parse markdown data | no params |
Example:
const mp = new GenerateHTMLPage('# hello');
mp.generateHTMLPage(); // generate md-theme.css then parse '# hello' then generate md.html with parsed markdown and return HTML page as string
You can write me to pyto015@ya.ru or open issue at Github repo
Links