2.0.0-alpha.0 • Published 3 years ago
contently-transform-markdown v2.0.0-alpha.0
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 HTMLfrontmatter
: parses YAML frontmatterextract
: adds frontmatter data to the vfileassetResolver
: 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 ofexcerpt
, all paragraphs before a<!-- more -->
tag or the first paragraph of text (in that order).