0.1.0 • Published 4 years ago

@fundamend/config-rehype v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

config-rehype

config-rehype is a configuration preset for rehype-cli used by the fundamend.dev ecosystem.

Installation

Use your favorite Node.js package manager, for example npm, like so:

npm install --save-dev @fundamend/config-rehype

... or yarn, like so:

yarn add --dev @fundamend/config-rehype

Usage

In your .rehyperc.js, import config-rehype and add it to the plugins array, like so:

const fundamend = require('@fundamend/config-rehype');

const plugins = [fundamend];
const settings = {};

module.exports = {
	plugins: plugins,
	settings: settings,
};

You can extend the imported preset by adding additional plugins to the plugin array or configuration options to the exported settings object, for example like this:

const fundamend = require('@fundamend/config-rehype');
const inlineSVG = require('@jsdevtools/rehype-inline-svg');

const plugins = [fundamend, inlineSVG];
const settings = {};

module.exports = {
	plugins: plugins,
	settings: settings,
};

Settings that already exist in the configuration preset will be overwritten.

License

MIT