New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teambit/mdx

Package Overview
Dependencies
Maintainers
16
Versions
1445
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/mdx

--- description: 'MDX aspect for component documantation and MDX components.' labels: ['extension', 'aspect', 'mdx', 'bit'] ---

  • 0.0.173
  • npm
  • Socket score

Version published
Weekly downloads
814
decreased by-65.23%
Maintainers
16
Weekly downloads
 
Created
Source

description: 'MDX aspect for component documantation and MDX components.' labels: ['extension', 'aspect', 'mdx', 'bit']

The MDX aspect introduces MDX components and MDX component documentation to the Bit toolchain.

  • MDX components. The react environments now supports MDX by default. This means, any component configured with the React Environment can now compile .mdx files to React components.
  • MDX docs . Components can now be documented with MDX.
  • Each component now accepts a *.docs.mdx file. So for example: button.docs.mdx will be rendered in the component Overview section.
  • Plain markdown support. Regular markdown files are also supported and rendered through MDX. (e.g. is-string.docs.md).
  • MDX component compiler. Compiler for MDX files. Can be configured in environments as any other compiler to support compilation of MDX files.

Bit flavored MDX

The new Bit flavored MDX brings the Bit design system for component documantation teambit/documenter to MDX, provides a way to communicate documantation metadata to Bit and allows the creation of sharing of MDX components.

Example:

---
displayName: Simple component
description: This is a very simple component description.
labels: ['first', 'component']
---

# A markdown title

Some markdown content.

In this example, metadata is communicated and parsed through frontmatter and emitted from the markdown content but content is rendered in the Overview section. MDX is compiled without the frontmatter which is emitted prior to compiling.

This is built from three major components:

  • MDX Layout which is responsible for bringing Bit design system for component documantation teambit/documenter to MDX by default. Developers can replace MDX layout through the Docs aspect registerMDXLayout() API to include their own design systems and components to render markdown for component documantation.
  • Bit MDX compiler. Independent module for compiling MDX flavoured Markdown.
  • Bit MDX loader. Webpack loader for Bit flavored MDX. Can be used from any Webpack configuration.

Keywords

FAQs

Package last updated on 09 Dec 2020

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