Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-app-rewire-frontmatter-markdown

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-app-rewire-frontmatter-markdown

frontmatter-markdown-loader config for react-app-rewired

  • 1.0.0-2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-app-rewire-frontmatter-markdown

npm

Add frontmatter-markdown-loader to create-react-app with react-app-rewired. You create-react-app project can import FrontMatter Markdown as React Component/HTML + FrontMatter Atrributes 🔌

Usage

yarn add -D react-app-rewire-frontmatter-markdown

Configuration

In config-overrides.js for react-app-rewired:

const rewireFrontmatterMarkdown = require('react-app-rewire-frontmatter-markdown');

module.exports = function override(config, env) {
  rewireFrontmatterMarkdown(config); // <-- THIS
  return config;
}

This inserts the loader config for /\.md$/.

Options

You can give your own options through the second argument.

const rewireFrontmatterMarkdown = require('react-app-rewire-frontmatter-markdown');

module.exports = function override(config, env) {
  // THIS
  rewireFrontmatterMarkdown(
    config,
    {
      mode: ['html', 'react'],
      markdownIt: {
        html: true,
        linkify: true,
        breaks: true
      }
    }
  );
  return config;
}

Full documentation for frontmatter-markdown-loader is in: https://hmsk.github.io/frontmatter-markdown-loader/options

Default option for frontmatter-markdown-loader is

{
  mode: ['react']
}

License

MIT License, Copyright 2019-present Kengo Hamasaki

Keywords

FAQs

Package last updated on 03 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc