contently-transform-markdown
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.0 • Public • Published

Contently Transform Markdown

Uses Remark to transform your Markdown content.

Usage

import ContentlyTransformMarkdown from 'contently-transform-markdown';

contently.use(ContentlyTransformMarkdown, options?);

Options

interface Options {
	/**
	 * @name plugins
	 * @description An array of Remark plugins.
	 * @default 'html,frontmatter,extract-frontmatter'
	 */
	plugins: Array<{ plugin: any; options?: any }>;
}

Asset resolving

TODO: explain it

Built-in Remark plugins

By default, the following plugins are loaded, which you can modify using hooks as shown above:

  • html: transforms Markdown to HTML
  • frontmatter: parses YAML frontmatter
  • extract: adds frontmatter data to the vfile
  • assetResolver: custom plugin, allows you to hook into asset loading (see above)
  • excerptGenerator: also custom, adds an excerpt to the result's attributes, which is either the frontmatter value of excerpt, all paragraphs before a <!-- more --> tag or the first paragraph of text (in that order).

/contently-transform-markdown/

    Package Sidebar

    Install

    npm i contently-transform-markdown

    Weekly Downloads

    1

    Version

    2.0.0-alpha.0

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    10

    Last publish

    Collaborators

    • krmax44