Uses Remark to transform your Markdown content.
import ContentlyTransformMarkdown from 'contently-transform-markdown';
contently.use(ContentlyTransformMarkdown, options?);
interface Options {
/**
* @name plugins
* @description An array of Remark plugins.
* @default 'html,frontmatter,extract-frontmatter'
*/
plugins: Array<{ plugin: any; options?: any }>;
}
TODO: explain it
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 ofexcerpt
, all paragraphs before a<!-- more -->
tag or the first paragraph of text (in that order).