How to use the refractor.alias function in refractor

To help you get started, we’ve selected a few refractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hashicorp / consul / ui / packages / consul-ui / .docfy-config.js View on Github external
const path = require('path');
const autolinkHeadings = require('remark-autolink-headings');
const refractor = require('refractor');
const prism = require('@mapbox/rehype-prism');

refractor.alias('handlebars', 'hbs');
refractor.alias('shell', 'sh');

module.exports = {
  remarkHbsOptions: {
    escapeCurliesCode: false
  },
  remarkPlugins: [
    autolinkHeadings,
    {
      behavior: 'wrap'
    }
  ],
  rehypePlugins: [
    prism
  ],
  sources: [
    {
github hashicorp / consul / ui / packages / consul-ui / .docfy-config.js View on Github external
const path = require('path');
const autolinkHeadings = require('remark-autolink-headings');
const refractor = require('refractor');
const prism = require('@mapbox/rehype-prism');

refractor.alias('handlebars', 'hbs');
refractor.alias('shell', 'sh');

module.exports = {
  remarkHbsOptions: {
    escapeCurliesCode: false
  },
  remarkPlugins: [
    autolinkHeadings,
    {
      behavior: 'wrap'
    }
  ],
  rehypePlugins: [
    prism
  ],
  sources: [