All Projects β†’ jxnblk β†’ Live Doc

jxnblk / Live Doc

πŸ’« Convert markdown to live React demos

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Live Doc

Assemble
Community
Stars: ✭ 3,995 (+4018.56%)
Mutual labels:  docs, markdown
Pup
The Ultimate Boilerplate for Products.
Stars: ✭ 563 (+480.41%)
Mutual labels:  markdown, styled-components
Mdx Docs
πŸ“ Document and develop React components with MDX and Next.js
Stars: ✭ 412 (+324.74%)
Mutual labels:  docs, markdown
Docsify
πŸƒ A magical documentation site generator.
Stars: ✭ 19,310 (+19807.22%)
Mutual labels:  docs, markdown
Docsify Tabs
A docsify.js plugin for rendering tabbed content from markdown
Stars: ✭ 65 (-32.99%)
Mutual labels:  docs, markdown
React Stripe Menu
A clone of Stripe's animated menu using React, Styled Components and React-Flip-Toolkit
Stars: ✭ 352 (+262.89%)
Mutual labels:  demo, styled-components
Markdown Magic
πŸ’« Automatically format markdown files, sync external docs/src code & make better docs
Stars: ✭ 551 (+468.04%)
Mutual labels:  docs, markdown
Gitdocs
Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.
Stars: ✭ 252 (+159.79%)
Mutual labels:  docs, markdown
Parse Comments
Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
Stars: ✭ 53 (-45.36%)
Mutual labels:  docs, markdown
Vuesence Book
Minimalistic Vue.js based documentation system component
Stars: ✭ 48 (-50.52%)
Mutual labels:  docs, markdown
Docma
A powerful tool to easily generate beautiful HTML documentation from JavaScript (JSDoc), Markdown and HTML files.
Stars: ✭ 287 (+195.88%)
Mutual labels:  docs, markdown
Docnado
Rapid documentation tool that will blow you away...
Stars: ✭ 67 (-30.93%)
Mutual labels:  docs, markdown
Format Readme
Π€ΠΎΡ€ΠΌΠ°Ρ‚ Ρ„Π°ΠΉΠ»Π° README
Stars: ✭ 270 (+178.35%)
Mutual labels:  docs, markdown
Readme
πŸ‘‹ - The documentation for being an Artsy Engineer
Stars: ✭ 380 (+291.75%)
Mutual labels:  docs, markdown
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+168.04%)
Mutual labels:  markdown, styled-components
Verb
HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
Stars: ✭ 442 (+355.67%)
Mutual labels:  docs, markdown
Press
Minimalist Markdown Publishing for Nuxt.js
Stars: ✭ 181 (+86.6%)
Mutual labels:  docs, markdown
Wisteria
Beautiful document tool for your project.
Stars: ✭ 226 (+132.99%)
Mutual labels:  docs, markdown
Bluedoc
An open-source document management tool for enterprise self host.
Stars: ✭ 579 (+496.91%)
Mutual labels:  docs, markdown
Funbook Old
I have a dream, to be a novelist someday.
Stars: ✭ 65 (-32.99%)
Mutual labels:  docs, markdown

No longer maintained see https://mdxjs.com for a better alternative

live-doc

Convert markdown to live React demos http://jxnblk.com/live-doc

Built with: react-markdown, React Live, Rebass, and styled-components

Getting Started

npm i -g live-doc

Convert a markdown file to a React app and save as index.html:

doc README.md

Live Code Example

By using the .jsx language attribute at the beginning of a code block, live-doc will convert the example into a live-editable example using React Live.

<div>
  <Heading color='tomato'>
    Hello! Edit me
  </Heading>
  <button
    onClick={e => {
      alert('Hello')
    }}
    children='Beep'
  />
</div>

In this example, the Rebass Heading component has been added to the scope in the docs/config.js file, making it available to the React Live preview.

React Live noInline Mode

To enable the noInline mode in React Live, use the ..jsx language attribute at the beginning of a code block.

const Hello = () => <h1>Hello</h1>

const App = () => (
  <div>
    <Hello />
    <button
      onClick={e => {
        alert('Beep')
      }}
      children='Beep'
    />
  </div>
)

render(<App />)

CLI Options

-d --out-dir    Output directory
-c --config     Path to config file

Configuration

To customize the output React app, create a config file that exports an object.

// config.js
module.exports = {
  // Scope for react-live previews
  scope: {
    foo: 'Hello'
  },
  title: 'Page Title',
  css: 'body { color: tomato }',
  script: 'console.log("Hello");',
  // Meta tags
  meta: [
    {
      name: 'og:image',
      content: 'kitten.jpg'
    }
  ]
}

Then pass the file with the --config flag to the CLI.

doc README.md --config config.js

GitHub Made by Jxnblk

MIT License

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