Skip to content

The @nitonodev/aeromd plugin for generate html pages

Notifications You must be signed in to change notification settings

nitono/aeromd-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@nitonodev/aeromd-html

The @nitonodev/aeromd plugin for generate html pages


See changes at CHANGELOG.md



Installation

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

Usage

Connecting

To connect this library to you code you may to write next lines of code
// if you use a commonjs
const { GenerateHTMLPage } = require('@nitonodev/aeromd-html');
// if you use a esm
import { GenerateHTMLPage } from '@nitonodev/aeromd-html';

Quick Start

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');

Generate styles for markdown

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

Generate HTML page for markdown

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

Feedback

You can write me to pyto015@ya.ru or open issue at Github repo

Links

About

The @nitonodev/aeromd plugin for generate html pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published