From fde713fdbcd80213ac02d35cf2fb4027dbd854a6 Mon Sep 17 00:00:00 2001 From: James Brumond Date: Sat, 29 Apr 2023 15:33:50 -0700 Subject: [PATCH] readme --- readme.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e3e38ff --- /dev/null +++ b/readme.md @@ -0,0 +1,48 @@ + +# Markdown to HTML Converter + +This project pulls together a number of other projects, along with some custom extensions, to provide rendering to HTML for a custom, extended version of Markdown. + +These are the primary projects used to render various types of content: + +- [Marked](https://marked.js.org/) +- [Prism.js](https://prismjs.com/) +- [Vega](https://vega.github.io/vega/) +- [nomnoml](https://www.nomnoml.com/) +- [bytefield-svg](https://bytefield-svg.deepsymmetry.org/bytefield-svg/1.6.1/intro.html) +- [Katex](https://katex.org/) +- [Pikchr](https://pikchr.org/home/doc/trunk/homepage.md) +- [node-qrcode](https://github.com/soldair/node-qrcode) + + + +## Building from source + +```bash +npm run tsc +``` + + + +## Programatic Use + +```ts +import { MarkdownOptions, MarkdownExtension, render_markdown_to_html } from './build'; + +async function main() { + const opts: MarkdownOptions = { + // ... + }; + + const html = await render_markdown_to_html('# This is some markdown', opts); +} +``` + + + +## Command Line Use + +```bash +echo '# This is some markdown' | ./bin/markdown2html [...options] > output.html +``` +