Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /docs directory for GitHub Pages #1138

Merged
merged 5 commits into from Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/release.md
Expand Up @@ -19,7 +19,7 @@ Note: If merges to `master` occur after submitting this PR and before running `$

In most cases, this should be someone different than the publisher.

- [ ] Version in `package.json` has been updated (see [RELEASE.md](https://github.com/markedjs/marked/blob/master/RELEASE.md)).
- [ ] Version in `package.json` has been updated (see [RELEASE.md](https://github.com/markedjs/marked/blob/master/docs/RELEASE.md)).
- [ ] The `marked.min.js` has been updated; or,
- [ ] release does not change library.
- [ ] cm_autolinks is the only failing test (remove once CI is in place and all tests pass).
Expand Down
1 change: 1 addition & 0 deletions .npmignore
@@ -1,2 +1,3 @@
.git*
test/
docs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent publishing the docs directory to npm which is usually not advised.

64 changes: 9 additions & 55 deletions README.md
@@ -1,34 +1,19 @@
<ul>
<li><a href="#marked">About</a></li>
<li><a href="#install">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#specifications">Supported Markdown specifications</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#authors">Authors</a></li>
<li><a href="#license">License</a></li>
</ul>

<h2 id="marked">Marked</h2>
# Marked
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I greatly simplified the main README and moved the more complex one to /docs/README.md


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>
1. built for speed.
2. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.
3. light-weight while implementing all markdown features from the supported flavors & specifications.
4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects.

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

<h2 id="installation">Installation</h2>
## Installation

**CLI:** `npm install -g marked`

**In-browser:** `npm install marked --save`

<h2 id="usage">Usage</h2>
## Usage

**CLI**

Expand All @@ -48,52 +33,21 @@ $ cat hello.html
<head>
<meta charset="utf-8"/>
<title>Marked in the browser</title>
<script src="/path/to/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>
<body>
<div id="content"></div>
<script>
document.getElementById('content').innerHTML =
marked('# Marked in browser\n\nRendered by **marked**.');
marked('# Marked in the browser\n\nRendered by **marked**.');
</script>
</body>
</html>
```


Marked offers [advanced configurations](https://github.com/markedjs/marked/blob/master/USING_ADVANCED.md) and [extensibility](https://github.com/markedjs/marked/blob/master/USING_PRO.md) as well.

<h2 id="specifications">Supported Markdown specifications</h2>

We actively support the features of the following [Markdown flavors](https://github.com/commonmark/CommonMark/wiki/Markdown-Flavors).

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

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.

<h2 id="security">Security</h2>

The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously.

Therefore, please disclose potential security issues by email to the project [committers](https://github.com/markedjs/marked/blob/master/AUTHORS.md) as well as the [listed owners within NPM](https://docs.npmjs.com/cli/owner). We will provide an initial assessment of security reports within 48 hours and should apply patches within 2 weeks (also, feel free to contribute a fix for the issue).

<h2 id="contributing">Contributing</h2>

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 you're a veteran with it all figured out, we're here to help each other improve as professionals while helping Marked improve technically. Please see our [contributing documentation](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md) for more details.

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

<h2 id="license">License</h2>
## License

Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)

See [license](https://github.com/markedjs/marked/blob/master/LICENSE.md) for more details.

2 changes: 0 additions & 2 deletions doc/todo.md

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md → docs/CODE_OF_CONDUCT.md
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team by submitting a PR with changes to the [AUTHORS](https://github.com/markedjs/marked/blob/master/AUTHORS.md) page (or emailing josh@8fold.com). All
reported by contacting the project team by submitting a PR with changes to the [AUTHORS](AUTHORS.md) page (or emailing josh@8fold.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md → docs/CONTRIBUTING.md
Expand Up @@ -25,15 +25,15 @@ The following table lists the ticket type labels we use when there is work to be
|Ticket type label |Description |
|:----------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|L0 - security |A security vulnerability within the Marked library is discovered. |
|L1 - broken |Valid usage results in incorrect output compared to [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications) OR causes marked to crash AND there is no known workaround for the issue. |
|L1 - broken |Valid usage results in incorrect output compared to [supported specifications](AUTHORS.md#specifications) OR causes marked to crash AND there is no known workaround for the issue. |
|L2 - annoying |Similar to L1 - broken only there is a known workaround avaialable for the issue. |
|RR - refactor and re-engineer |Results in an improvement to developers using Marked (improved readability) or end-users (faster performance) or both. |
|NFS - new feature (spec related) |A capability Marked does not currently provide but is in one of the [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications)|
|NFS - new feature (spec related) |A capability Marked does not currently provide but is in one of the [supported specifications](AUTHORS.md#specifications)|
|NFU - new feature (user requested) |A capability Marked does not currently provide but has been requested by users of Marked. |

## Test early, often, and everything

We try to write test cases to validate output (writing tests based on the [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications)) and minimize regression (writing tests for issues fixed). Therefore, if you would like to contribute, some things you should know regarding the test harness.
We try to write test cases to validate output (writing tests based on the [supported specifications](AUTHORS.md#specifications)) and minimize regression (writing tests for issues fixed). Therefore, if you would like to contribute, some things you should know regarding the test harness.

|Location |Description |
|:-------------|:---------------------------------------------------|
Expand Down Expand Up @@ -92,4 +92,4 @@ npm run build

## Publishing

Creating GitHub releases and publishing to NPM is limited to conributors and owners. If you would like more information, please see our [publishing documentation](https://github.com/markedjs/marked/blob/master/PUBLISHING.md).
Creating GitHub releases and publishing to NPM is limited to conributors and owners. If you would like more information, please see our [publishing documentation](PUBLISHING.md).
2 changes: 1 addition & 1 deletion PUBLISHING.md → docs/PUBLISHING.md
@@ -1,6 +1,6 @@
# Releasing Marked

- [ ] See [contributing](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md)
- [ ] See [contributing](CONTRIBUTING.md)
- [ ] Create release branch from `master` (`release-x.y.z`)
- [ ] Submit PR with minimal name: Release x.y.z
- [ ] Complete PR checklists
Expand Down
99 changes: 99 additions & 0 deletions docs/README.md
@@ -0,0 +1,99 @@
<ul>
<li><a href="#marked">About</a></li>
<li><a href="#install">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#specifications">Supported Markdown specifications</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#authors">Authors</a></li>
<li><a href="#license">License</a></li>
</ul>

<h2 id="marked">Marked</h2>

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>
4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects.

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

<h2 id="installation">Installation</h2>

**CLI:** `npm install -g marked`

**In-browser:** `npm install marked --save`

<h2 id="usage">Usage</h2>

**CLI**

``` bash
$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
```

**Browser**

```html
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Marked in the browser</title>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>
<body>
<div id="content"></div>
<script>
document.getElementById('content').innerHTML =
marked('# Marked in browser\n\nRendered by **marked**.');
</script>
</body>
</html>
```


Marked offers [advanced configurations](USING_ADVANCED.md) and [extensibility](USING_PRO.md) as well.

<h2 id="specifications">Supported Markdown specifications</h2>

We actively support the features of the following [Markdown flavors](https://github.com/commonmark/CommonMark/wiki/Markdown-Flavors).

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

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.

<h2 id="security">Security</h2>

The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously.

Therefore, please disclose potential security issues by email to the project [committers](AUTHORS.md) as well as the [listed owners within NPM](https://docs.npmjs.com/cli/owner). We will provide an initial assessment of security reports within 48 hours and should apply patches within 2 weeks (also, feel free to contribute a fix for the issue).

<h2 id="contributing">Contributing</h2>

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 you're a veteran with it all figured out, we're here to help each other improve as professionals while helping Marked improve technically. Please see our [contributing documentation](CONTRIBUTING.md) for more details.

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](AUTHORS.md).

<h2 id="license">License</h2>

Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)

See [license](https://github.com/markedjs/marked/blob/master/LICENSE.md) for more details.

File renamed without changes.
File renamed without changes.
File renamed without changes.