Installation Guide
This section provides detailed instructions on how to install and use Markdown Maestro as a library in your own projects.
Package Installation
To get started, you need to install the `markdown-maestro` package from npm. Open your project's terminal and run one of the following commands, depending on your package manager:
npm
npm install markdown-maestroyarn
yarn add markdown-maestropnpm
pnpm add markdown-maestroBasic Usage
Once installed, you can import the `maestro` function and use it to parse your Markdown strings into HTML.
import { maestro } from 'markdown-maestro';
const markdownString = '# Hello, World!';
const htmlOutput = maestro(markdownString);
console.log(htmlOutput);
// Output: <h1>Hello, World!</h1>Configuration
You can configure the parser by passing an options object to the `maestro.setOptions` method. This allows you to customize features like syntax highlighting, GFM support, and more.
import { maestro } from 'markdown-maestro';
maestro.setOptions({
gfm: true,
breaks: true,
// other options...
});
const html = maestro('Hard line breaks\nAre enabled.');For a full list of available options, please refer to the Extensibility section.