All Projects → hamlim → inline-mdx.macro

hamlim / inline-mdx.macro

Licence: other
A babel-macro for transforming mdx inline

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to inline-mdx.macro

theme-starter
🐤 A sample Next.js project for getting started with MDX, Theme UI, & Hack Club Theme.
Stars: ✭ 71 (-24.47%)
Mutual labels:  mdx
remark-hint
Sprinkle hints/tips/warnings on your documents
Stars: ✭ 36 (-61.7%)
Mutual labels:  mdx
mdx-site
Static site generator powered by TypeScript, MDX, & React.
Stars: ✭ 48 (-48.94%)
Mutual labels:  mdx
MdxSourceBuilder
一键制作mdx图片词典
Stars: ✭ 25 (-73.4%)
Mutual labels:  mdx
NextBook
NextBook is quick and easy way to build technical books or documentation with markdown that run blazingly fast.
Stars: ✭ 153 (+62.77%)
Mutual labels:  mdx
mdxtools
A bunch of tools for handling the MDX music format (music for the Sharp x68000)
Stars: ✭ 44 (-53.19%)
Mutual labels:  mdx
MMDSP
multi music status display MMDSP
Stars: ✭ 35 (-62.77%)
Mutual labels:  mdx
cra-macro-example
This is an example of how you can use Create React App with Babel Plugin Macros.
Stars: ✭ 38 (-59.57%)
Mutual labels:  babel-plugin-macros
penv.macro
A macro used with babel-plugin-macros to write configurations for multiple environments, and remove configurations are irrelevant with the specified environment from your codes finally.
Stars: ✭ 73 (-22.34%)
Mutual labels:  babel-plugin-macros
htmdx
HTMDX: Lightweight runtime for mdx-like markdown
Stars: ✭ 82 (-12.77%)
Mutual labels:  mdx
nikolovlazar.com
My personal site's repo built using Next.js, Chakra UI, MDX, Prisma, PlanetScale.
Stars: ✭ 126 (+34.04%)
Mutual labels:  mdx
joeprevite.com
my digital garden 🌱
Stars: ✭ 31 (-67.02%)
Mutual labels:  mdx
js-mdict
*.mdx/*.mdd interpreter js implements
Stars: ✭ 91 (-3.19%)
Mutual labels:  mdx
jahir.dev
My personal website 💎 – Built using Next.js, TypeScript, MDX, contentlayer, Notion and Stitches styled components
Stars: ✭ 119 (+26.6%)
Mutual labels:  mdx
mdx-module
MDX module for Nuxt
Stars: ✭ 44 (-53.19%)
Mutual labels:  mdx
samuelkraft-next
My personal website written with Next.js, Typescript, MDX, Tailwind
Stars: ✭ 250 (+165.96%)
Mutual labels:  mdx
next-mdx-frontmatter
Use MDX + front-matter with Next.js
Stars: ✭ 27 (-71.28%)
Mutual labels:  mdx
garden
🌱 a place to think about digital gardening
Stars: ✭ 18 (-80.85%)
Mutual labels:  mdx
react-intl.macro
Extract react-intl messages with babel-plugin-macros.
Stars: ✭ 39 (-58.51%)
Mutual labels:  babel-plugin-macros
nextjs-complete-boilerplate
Next js 12.3.1 boilerplate with Styled Components, Jest, React Testing Library, Prettier, ESLint, Plop JS and more 🚀
Stars: ✭ 50 (-46.81%)
Mutual labels:  mdx

inline-mdx.macro

Babel Macro

npm version

A babel-macro for converting mdx into an inline component.

/** @jsx mdx */
import { mdx } from '@mdx-js/react'
import { inline } from 'inline-mdx.macro'

const SomeMDXComponent = inline`

## This is some MDX source

<SomeComponent />

~~strikethrough~~
`

generates...

/** @jsx mdx */
import { mdx } from '@mdx-js/react'
const SomeMDXComponent = ...;
// you can now do <SomeMDXComponent />

⚠️ Important! ⚠️

You must add the following to any file using the inline macro:

/** @jsx mdx */
import { mdx } from '@mdx-js/react'

This ensures mdx picks up on the jsx code and renders it correctly.

Changes from v0 to v1:

  • Updated to MDX v1
  • Removed the import macro
  • Template strings are now formatted first using the dedent library
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].