Remark

Use Remark to render the markdown content.

Options See on deno.land

extensions string[]

List of extensions this plugin applies to

Default:
[ ".md" ]
remarkPlugins any[]

List of remark plugins to use

Default:
[remarkGfm]
rehypePlugins any[]

List of rehype plugins to use

sanitize boolean

Flag to turn on HTML sanitization to prevent XSS

Default:
false
overrideDefaultPlugins boolean

Flag to override the default plugins

Description

This plugin use Remark to render the markdown files, replacing the default markdown-it library. It allows to use Remark and Rehype plugins. By default it uses the GitHub-flavored markdown.

Installation

Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import remark from "lume/plugins/remark.ts";

const site = lume();

site.use(remark());

export default site;

Plugins

Use the remarkPlugins and rehypePlugins to configure additional plugins:

import lume from "lume/mod.ts";
import remark from "lume/plugins/remark.ts";
import a11yEmoji from 'npm:@fec/remark-a11y-emoji';
import rehypeRemoveComments from 'npm:rehype-remove-comments@5';

const site = lume();

site.use(remark({
  remarkPlugins: [allyEmoji]
  rehypePlugins: [rehypeRemoveComments]
}));

export default site;