All Projects → jxnblk → Ok Mdx

jxnblk / Ok Mdx

Browser-based MDX editor

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ok Mdx

Kit
Tools for developing, documenting, and testing React component libraries
Stars: ✭ 1,201 (+76.36%)
Mutual labels:  cli, mdx, development, jsx
Gatsby Plugin Mdx
gatsby v1 mdx plugin, for gatsby v2 see https://github.com/ChristopherBiscardi/gatsby-mdx
Stars: ✭ 50 (-92.66%)
Mutual labels:  markdown, mdx, jsx
Mdx Go
⚡️ Lightning fast MDX-based dev server for progressive documentation
Stars: ✭ 340 (-50.07%)
Mutual labels:  markdown, mdx, development
Mdx
Markdown for the component era
Stars: ✭ 11,948 (+1654.48%)
Mutual labels:  markdown, mdx, jsx
X0
Document & develop React components without breaking a sweat
Stars: ✭ 1,706 (+150.51%)
Mutual labels:  markdown, mdx, jsx
Mdx Util
Utilities for working with MDX
Stars: ✭ 709 (+4.11%)
Mutual labels:  markdown, mdx, jsx
Awesome
A curated list of awesome MDX resources
Stars: ✭ 195 (-71.37%)
Mutual labels:  markdown, mdx, jsx
Xdm
a modern MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
Stars: ✭ 206 (-69.75%)
Mutual labels:  markdown, mdx, jsx
Nb
CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
Stars: ✭ 3,846 (+464.76%)
Mutual labels:  cli, markdown
J
❌ Multi-format spreadsheet CLI (now merged in http://github.com/sheetjs/js-xlsx )
Stars: ✭ 343 (-49.63%)
Mutual labels:  cli, markdown
Gatsby Theme Code Notes
A Gatsby theme for publishing code-related notes to your website
Stars: ✭ 370 (-45.67%)
Mutual labels:  markdown, mdx
Markserv
🏁 serve markdown as html (GitHub style), index directories, live-reload as you edit
Stars: ✭ 304 (-55.36%)
Mutual labels:  cli, markdown
Gatsby Digital Garden
🌷 🌻 🌺 Create a digital garden with Gatsby
Stars: ✭ 291 (-57.27%)
Mutual labels:  markdown, mdx
Tty Markdown
Convert a markdown document or text into a terminal friendly output.
Stars: ✭ 275 (-59.62%)
Mutual labels:  cli, markdown
Mdx Docs
📝 Document and develop React components with MDX and Next.js
Stars: ✭ 412 (-39.5%)
Mutual labels:  markdown, mdx
Md To Pdf
Hackable CLI tool for converting Markdown files to PDF using Node.js and headless Chrome.
Stars: ✭ 374 (-45.08%)
Mutual labels:  cli, markdown
Pydoc Markdown
Create Python API documentation in Markdown format.
Stars: ✭ 273 (-59.91%)
Mutual labels:  cli, markdown
Httplab
The interactive web server
Stars: ✭ 3,752 (+450.95%)
Mutual labels:  cli, development
Backslide
💦 CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (-0.29%)
Mutual labels:  cli, markdown
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+617.47%)
Mutual labels:  cli, development

ok-mdx

Browser-based MDX editor

npm i -g ok-mdx
mkdir docs
touch docs/hello.mdx
mdx docs --open
  • Quickly prototype with React components
  • Zero configuration
  • Mix markdown with JSX
  • Live edit and autosave

What is this for?

MDX is great for documentation, building demos, or quickly prototyping with React components, without the need to set up a full-blown React application. Similar to Compositor x0, ok-mdx is meant to be installed as a global command line utility that you can use alongside your application setup or in isolated sandbox environments. ok-mdx works well as a local alternative to tools like CodeSandbox when working with React components.

Getting Started

ok-mdx needs a directory of .mdx or .md files to work.

After installing ok-mdx, create a folder and an empty .mdx file with the following command:

mkdir docs && touch docs/hello.mdx

Start the ok-mdx app:

mdx docs --open

This will open the application in your default browser, showing a list of the MDX files. Click on a filename to open the editor view. In the right panel, add some text to see the preview on the left.

MDX Format

MDX is a superset of markdown, which can also render JSX instead of HTML.

# Markdown Heading

<button className='blue'>JSX button</button>

Importing Components

In order to import components, be sure they're installed locally. This requires a package.json file in your current directory.

To create a package.json file, run npm init -y.

To install a component, use npm install. The following will install grid-styled and styled-components as a local dependency.

npm i grid-styled styled-components

To use components, import them at the top of your MDX file:

import { Flex, Box } from 'grid-styled'

# Hello

<Flex alignItems='center'>
  <Box p={3} width={1/2} bg='blue'>
    Flex
  </Box>
  <Box p={3} width={1/2}>
    Box
  </Box>
</Flex>

Options

-o --open     Opens development server in default browser
-p --port     Port for development server
--vim         Enable editor Vim mode

Exporting

ok-mdx is only meant to be used for development. To export your MDX files, consider one of the following tools:

  • Compositor x0: great for creating documentation, blogs, static sites, or other small demos
  • Next.js: great for creating production-ready, server-side rendered React applications

Related

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].