2018-02-25 14:18:59 -05:00
Marked is
1. built for speed.< sup > *</ sup >
2. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.< sup > **</ sup >
3. light-weight while implementing all markdown features from the supported flavors & specifications.< sup > ***</ sup >
2018-02-25 15:17:16 -05:00
4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects.
2018-02-25 14:18:59 -05:00
2018-02-25 17:58:24 -05:00
< p > < small > < sup > *< / sup > Still working on metrics for comparative analysis and definition.< / small > < br >
< small > < sup > **< / sup > As few dependencies as possible.< / small > < br >
< small > < sup > ***< / sup > Strict compliance could result in slower processing when running comparative benchmarking.< / small > < / p >
2013-06-28 11:54:34 -07:00
2018-02-18 22:19:37 -06:00
< ul >
< li >< a href = " #install " > Installation</ a ></ li >
< li >< a href = " #usage " > Usage</ a ></ li >
2018-02-25 16:01:22 -05:00
< li >< a href = " #specifications " > Supported Markdown specifications</ a ></ li >
2018-02-18 22:19:37 -06:00
< li >< a href = " #contributing " > Contributing</ a ></ li >
2018-02-25 18:06:03 -05:00
< li >< a href = " #authors " > Authors</ a ></ li >
2018-02-18 22:19:37 -06:00
< li >< a href = " #license " > License</ a ></ li >
< / ul >
2018-02-25 15:17:16 -05:00
< h2 id = "installation" > Installation< / h2 >
2013-06-28 11:54:34 -07:00
2018-02-25 15:17:16 -05:00
**CLI:** `npm install -g marked`
2016-07-08 16:04:04 -03:00
2018-02-25 15:17:16 -05:00
**In-browser:** `npm install marked --save`
2016-07-08 16:04:04 -03:00
2018-02-18 22:19:37 -06:00
< h2 id = "usage" > Usage< / h2 >
2013-06-28 11:54:34 -07:00
2018-02-25 15:17:16 -05:00
**CLI**
2013-06-28 11:54:34 -07:00
2018-02-25 15:17:16 -05:00
``` bash
$ marked -o hello.html
hello world
^D
$ cat hello.html
< p > hello world< / p >
2013-06-28 11:54:34 -07:00
```
2018-02-25 15:17:16 -05:00
**Browser**
2014-05-06 15:48:15 +02:00
```html
<!doctype html>
< html >
< head >
< meta charset = "utf-8" / >
< title > Marked in the browser< / title >
2018-02-25 15:17:16 -05:00
< script src = "/path/to/marked.min.js" > < / script >
2014-05-06 15:48:15 +02:00
< / head >
< body >
< div id = "content" > < / div >
< script >
document.getElementById('content').innerHTML =
marked('# Marked in browser\n\nRendered by **marked** .');
< / script >
< / body >
< / html >
```
2013-06-28 11:54:34 -07:00
2018-02-25 16:01:22 -05:00
Marked offers [advanced configurations ](https://github.com/markedjs/marked/blob/master/USAGE_ADVANCED.md ) and [extensibility ](https://github.com/markedjs/marked/blob/master/USAGE_EXTENSIBILITY.md ) as well.
2017-10-06 20:40:21 -04:00
2018-02-25 16:01:22 -05:00
< h2 id = "specifications" > Supported Markdown specifications< / h2 >
2013-08-07 10:36:54 -05:00
2018-02-25 16:01:22 -05:00
We actively support the features of the following [Markdown flavors ](https://github.com/commonmark/CommonMark/wiki/Markdown-Flavors ).
2013-06-28 11:54:34 -07:00
2018-02-25 16:01:22 -05:00
|Flavor |Version |
|:----------------------------------------------------------|:----------|
|The original markdown.pl |-- |
|[CommonMark ](http://spec.commonmark.org/0.28/ ) |0.28 |
|[GitHub Flavored Markdown ](https://github.github.com/gfm/ ) |0.28 |
2013-03-01 14:12:17 +08:00
2018-02-25 16:01:22 -05:00
By supporting the above Markdown flavors, it's possible that Marked can help you use other flavors as well; however, these are not actively supported by the community.
2013-03-01 14:12:17 +08:00
2011-08-26 05:20:42 -05:00
2018-02-18 22:19:37 -06:00
< h2 id = "contributing" > Contributing< / h2 >
2018-02-25 16:01:22 -05:00
The marked community enjoys a spirit of collaboration and contribution from all comers. Whether you're just getting started with Markdown, JavaScript, and Marked or your a veteran with it all, we're here to help you improve as a professional software developer while helping to improve Marked itself. Please see our [contributing documentation ](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md ) for more details.
2018-02-18 22:19:37 -06:00
2018-02-25 16:20:20 -05:00
For our Contribution License Agreement, see our [license ](https://github.com/markedjs/marked/blob/master/LICENSE.md ).
< h2 id = "authors" > Authors< / h2 >
For list of credited authors and contributors, please see our [authors page ](https://github.com/markedjs/marked/blob/master/AUTHORS.md ).
2018-02-18 22:19:37 -06:00
< h2 id = "license" > License< / h2 >
2012-01-03 00:35:47 -06:00
2017-12-25 17:53:35 -05:00
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
2012-01-03 00:35:47 -06:00
2018-02-25 16:20:20 -05:00
See [license ](https://github.com/markedjs/marked/blob/master/LICENSE.md ) for more details.
2013-08-07 10:36:54 -05:00