Skip to content
dbartholomaePublic

About

Generate markdown files with a React-like syntax.

Topics

Resources

Code of conduct

Contributing

Stars

12 stars

Watchers

1 watching

Forks

Latest commit

 

History

326 Commits

Folders and files

Repository files navigation

jsx-md

npm version downloads open issues build status codecov dependency status devDependency status

Generate markdown files with a React-like syntax.

Usage

// We need to tell the JSX transpiler that in this file,
// instead of React we use the custom createElement and Fragment
// functions from jsx-md
/* @jsx MD */
/* @jsxFrag Fragment */
import MD, { Component, Fragment, Heading, LineBreak, render, Text } from "jsx-md";
import { writeFileSync } from "fs";
import pkg from "./package.json";

const Readme: Component = () => (
  <>
    <Heading level={1}>{pkg.name}</Heading>
    <Text>{pkg.description}</Text>
    <LineBreak />
  </>
);

async function writeReadme() {
  writeFileSync("README.md", await render(<Readme />));
}

void writeReadme();

Documentation

There's a documentation of all elements you can use.

About

Generate markdown files with a React-like syntax.

Topics

Resources

Code of conduct

Contributing

Stars

12 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages