@fundamend/config-rehype
v0.1.0
Published
_config-rehype_ is a configuration preset for [rehype-cli] used by the [fundamend.dev] ecosystem.
Downloads
4
Readme
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.