marked/README.md

60 lines
1.3 KiB
Markdown
Raw Normal View History

2018-04-05 17:15:11 -04:00
<img width="128" height="128" src="https://marked.js.org/img/logo-black.svg" align="right">
2018-02-25 18:09:11 -05:00
2018-04-05 17:15:11 -04:00
# Marked
2018-02-25 14:18:59 -05:00
2018-04-05 17:15:11 -04:00
- ⚡ built for speed
2018-04-05 17:18:10 -04:00
- ⬇️ low-level markdown compiler for parsing without caching or blocking for long periods of time
2018-04-05 17:15:11 -04:00
- ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
- 🌐 works in the browser, on the server, or on the command line interface (CLI)
2018-02-25 14:18:59 -05:00
2018-03-25 20:46:27 -04:00
## Demo
2018-03-27 15:44:02 +03:00
Checkout the [demo page](https://marked.js.org/demo/) to see marked in action ⛹️
2018-03-25 20:46:27 -04:00
2018-04-05 17:15:11 -04:00
## Docs
2018-03-25 20:46:27 -04:00
Our [documentation pages](https://marked.js.org) are also rendered using marked 💯
## Installation
2013-06-28 11:54:34 -07:00
2018-02-25 15:17:16 -05:00
**CLI:** `npm install -g marked`
2018-02-25 15:17:16 -05:00
**In-browser:** `npm install marked --save`
## Usage
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>
</head>
<body>
<div id="content"></div>
2018-03-25 20:36:41 -04:00
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
2014-05-06 15:48:15 +02:00
<script>
document.getElementById('content').innerHTML =
marked('# Marked in the browser\n\nRendered by **marked**.');
2014-05-06 15:48:15 +02:00
</script>
</body>
</html>
```
## License
2012-01-03 00:35:47 -06:00
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
2012-01-03 00:35:47 -06:00